[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: GNUstep.h (was: Re: Setter Gettor method style)
From: |
Bissell, Tim |
Subject: |
RE: GNUstep.h (was: Re: Setter Gettor method style) |
Date: |
Thu, 8 Aug 2002 10:06:39 +0100 |
> From: Sir Raorn [mailto:raorn@binec.ru]
> I'm just not sure how ({}) will be expanded by preprocessor in
> for example this code:
>
> if(...)
> AUTORELEASE(...);
> else
> ...
>
> But it seems that I'm just a kind of paranoid ;-)
Check earlier emails on this subject in the list. ({ and }) are
untouched by the preprocessor; so it passes through to the C compiler.
({ ... }) is a gcc C language extension which turns a C compound statement
{ ... } into a C expression. A C expression followed by a semicolon is
a C statement, so
if (...)
{
({ ... });
}
id valid C (for gcc). As GNUstep is written for gcc and the gcc Objective-C
runtime, using gcc extensions to the C language is a valid policy.
hope this helps!
Tim
----------------------------------------------------------------------
If you have received this e-mail in error or wish to read our e-mail
disclaimer statement and monitoring policy, please refer to
http://www.drkw.com/disc/email/ or contact the sender.
----------------------------------------------------------------------
- RE: GNUstep.h (was: Re: Setter Gettor method style),
Bissell, Tim <=