Re: gcc linking question
Re: gcc linking question
- Subject: Re: gcc linking question
- From: mothra <email@hidden>
- Date: Sat, 3 Nov 2007 12:03:45 -0500
Excellent. Apple is not a rogue entity, my code is now more compliant,
*and* I now understand how the compiler was handling my old code. Thanks
so much for the help!
- Lowell
On Sat, Nov 03, 2007 at 08:52:48AM -0700, Duane Murphy wrote:
> --- 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