Re: __private_extern__
Re: __private_extern__
- Subject: Re: __private_extern__
- From: Garth Cummings <email@hidden>
- Date: Tue, 19 Oct 2004 09:04:56 -0700
On Oct 11, 2004, at 1:04 PM, Godfrey van der Linden wrote:
One other thing to note, __private_extern__ does not work for C++
files and headers.
Godfrey
Yep. g++ -v <foo>.cpp will show this on 10.3.5 with Xcode 1.5 installed:
-D__private_extern__=extern
--gc
On Oct 11, , at 8:21, stephane sudre wrote:
On Oct 11, 2004, at 5:13 PM, Brian Bergstrand wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Stephane,
Are you assigning an initial value to the var definition in your.c
file? If not, then the compiler will treat the definition as a
declaration, and no storage will be allocated.
.h
__private_extern__ int foo;
.c
__private_extern__ int foo = 0; // Allocate storage for foo.
That's definitely my case (no initial value). I would never have
suspected this.
Thanks.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
__________________________________________________________________
Garth Cummings
Apple Developer Technical Support email@hidden
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden