Re: gcc linking question
Re: gcc linking question
- Subject: Re: gcc linking question
- From: "Duane Murphy" <email@hidden>
- Date: Sat, 3 Nov 2007 08:52:48 -0700
--- At Sat, 3 Nov 2007 09:21:09 -0500, mothra wrote:
>
>Thanks for the input - it appears that that solution does work. It is a
>bit distressing to me that Apple's gcc 4.0.1 is not consistent with either
>RedHat's gcc 4.1.* or their gcc 3.*, or Apple's gcc 3.* in this regard. Is
>Apple striking out on its own here? Or is this requirement for two lines
>of code to initialize such variables an existing standard that only Apple
>is currently enforcing?
More recent compilers have changed.
I used to do exactly what you did. Previous compilers would essentially
treat the initialization as a immediate constant. That is the actual
variable and memory would not be allocated, but just use the initializer
value everywhere.
There must have been a determination that this was technically not
allowed. The solution is to do as the standard says and specify the
initializer separately. This has nothing to do with Apple, but rather
the maturation of the compilers.
...Duane
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden