Alessandro Rubini wrote:
>>> +#define SMC_insb(r,b,l)    ({      int __i ;  \
>>> +                                   byte *__b2;  \
>>> +                                   __b2 = (byte *) b;  \
>>> +                                   for (__i = 0; __i < l; __i++) {  \
>>> +                                     *(__b2 + __i) = SMC_inb(r);  \
>>> +                                     SMC_inb(0);  \
>>> +                                   };  \
>>> +                           })
>>>       
>
>   
>> [...] it's generally considered good form to wrap multi-line macros with 
>> do {...} while(0) in order to avoid compiler issues.
>>     
>
> But this is the "expression statement" gcc slang. the do/while0 thing
> avoids if/else problems but isn't an expression, it is a statement.
> This has no issue with if/else (no trailing semicolon or brace) and
> moreover it is an expression.
>
>   
Oh, I see.  Thanks for taking the time Alessandro.  I'm putting this 
back on list so others can be educated too.

regards,
Ben

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
U-Boot-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to