Re: symbols and {}
Re: symbols and {}
- Subject: Re: symbols and {}
- From: Markian Hlynka <email@hidden>
- Date: Wed, 3 Nov 2004 17:02:46 -0700
On Nov 3, 2004, at 16:49, Eric Albert wrote:
On Nov 3, 2004, at 3:07 PM, Markian Hlynka wrote:
I have some code that seems to be acting funny to me.
regardless of whether the symbol DOMAINHASH is defined or not, the
following fails to compile with the error
/Users/markian/Documents/School/PhD/Development/CodeGen/SearchEngine/
TT.cc:90: error: parse error before `return'
"parse error before 'return'" frequently means that you're missing a
brace somewhere. It's impossible to tell where that is without seeing
your whole file, but it shouldn't be too hard for you to track down
via various means.
I agree that this is what it should _usually mean. However, it is
precisely adding 2 braces _within a #ifdef block that causes the
problem. I have double checked all the braces in the function, and they
all match regardless. The only thing that flags my attention is that I
have a #elif on the opposite side of a brace in my failing situation.
Oh. Wait. you're right. That's it. I have
#ifndef FOO
{
blah;
#elif BLARG
}
#endif
So, if FOO is not defined, it puts in the first brace but not the
second.
if FOO is defined, it puts in the second brace but not the first!
It would be nice if I could see what the file looked like after the
preprocessor was through with it... I mean within xcode...
Markian
_______________________________________________
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