ivar name clashes with gcc3
ivar name clashes with gcc3
- Subject: ivar name clashes with gcc3
- From: Camillo Lugaresi <email@hidden>
- Date: Wed, 8 Feb 2006 15:05:32 +0100
I have the feeling that this might turn out to be a dumb question,
but...
I have a program that is usually built on 10.4 using gcc4. One class
has an ivar named "outline", which is also the name of an enum value
defined in MacTypes.h. Now I need to build this program on Panther
using gcc3, and it seems to have issues with that variable: namely,
unless it is prefixed with "self->", "outline" is always taken as a
reference to the enumerated constant instead of to the variable. This
causes all sorts of errors at compile time (not an lvalue, wrong type
etc) and at runtime (instead of the value of the variable, 8 is
always used).
The problem could be worked around by explicitly referencing the
variable using "self->outline", but it would make the code ugly, and
the bug is likely to reappear in the future. Is there some compiler
setting that I can use to get the same behavior as gcc4 with gcc3?
Camillo
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden