• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Variable length arrays in debugger
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Variable length arrays in debugger


  • Subject: Re: Variable length arrays in debugger
  • From: Tverdokhleb Andrey <email@hidden>
  • Date: Wed, 1 Oct 2008 11:27:14 -0700

It's allowed in C99. My code is in Objective-C though and it definitely compiles and works just fine.

http://developer.apple.com/documentation/DeveloperTools/gcc-4.2.1/gcc/Variable-Length.html

Andrey

On Oct 1, 2008, at 11:16 , Howard Moon wrote:

I've noticed that debugger in Xcode 3.1.1 always shows variable length arrays as "out of scope". If I change it to constant size array it works as it supposed to.
I'm talking about this kind of things:


int size;
....
int array[size];

I'm ready to file a bug, but would like to figure before if I'm not alone in this or may be there is some option needs to be enabled in compiler (couldn't find anything though).

Is that an extension allowed in GCC? According to the C++ Standard, arrays must have a compile-time constant size. Perhaps the Xcode debugger assumes that rule to be the case, even if the compiler has allowed it to compile?


-Howard

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
@gmail.com


This email sent to email@hidden



_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Variable length arrays in debugger (From: Tverdokhleb Andrey <email@hidden>)
 >Re: Variable length arrays in debugger (From: Howard Moon <email@hidden>)

  • Prev by Date: Re: Variable length arrays in debugger
  • Next by Date: Re: iPhone development with distcc
  • Previous by thread: Re: Variable length arrays in debugger
  • Next by thread: Mini Debugger missing "Debugger Strip"
  • Index(es):
    • Date
    • Thread