Re: unions named the same cause compiler error
Re: unions named the same cause compiler error
- Subject: Re: unions named the same cause compiler error
- From: Kai BrĂ¼ning <email@hidden>
- Date: Tue, 22 Dec 2009 19:46:17 +0100
On 22.12.2009, at 19:17, August Hahn wrote:
> I have code like this:
>
> @interface ClassA : NSObject
> {
> union _some_union {
> int x;
> float y;
> } u;
> }
> @end
>
> @interface ClassB : NSObject
> {
> union _some_union {
> int x;
> float y;
> } u;
> }
> @end
>
> when I compile, I get an error saying the second _some_union is a redefinition. Shouldn't the two be distinct, since they're in different classes?
No - sadly, Objective-C classes do not create namespaces.
Kai
_______________________________________________
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