Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gcc linking question



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:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: gcc linking question (From: mothra <email@hidden>)
 >Re: gcc linking question (From: "Duane Murphy" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.