• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
ivar name clashes with gcc3
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: ivar name clashes with gcc3
      • From: Ricky Sharp <email@hidden>
  • Prev by Date: Now available -- Re: [ANN] UKCrashReporter 0.1
  • Next by Date: Re: Crash when color well panel is open
  • Previous by thread: Re: replacing a part of the image with other image
  • Next by thread: Re: ivar name clashes with gcc3
  • Index(es):
    • Date
    • Thread