• 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
why does this code generate a[n incorrect] error?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

why does this code generate a[n incorrect] error?


  • Subject: why does this code generate a[n incorrect] error?
  • From: Markian Hlynka <email@hidden>
  • Date: Wed, 16 Jun 2004 15:26:52 -0600

extern int STOP;

#define EQUALS ==


if(STOP EQUAL 1) { do something }


This code generates:
PVS.cc:73: error: `STOP' undeclared (first use this function) (Each undeclared identifier is reported only once for each function it appears in.)
PVS.cc:73: error: parse error before numeric constant



This is not correct. STOP is declared! the problem is that my symbol "EQUAL" is incorrect. Is this something in the compiler that I don't understand, or is this a bug? xcode correctly allows me to command-click on STOP and brings up the actual declaration. But the compiler seems confused as to what the error is.


I've only tried this in xcode, and not on the command-line, but that shouldn't make a difference, should it?


Markian _______________________________________________ xcode-users mailing list | email@hidden Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: why does this code generate a[n incorrect] error?
      • From: Justin Walker <email@hidden>
  • Prev by Date: Re: Sticky breakpoints
  • Next by Date: PPC970FX "Event MUX" button in MONster
  • Previous by thread: Re: Sticky breakpoints
  • Next by thread: Re: why does this code generate a[n incorrect] error?
  • Index(es):
    • Date
    • Thread