This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Style and Conventions: Multi-line function-like macro formatting.


On Thu, 18 Jan 2018, Zack Weinberg wrote:

> I think we're in violent agreement:  An inline function should be used
> whenever possible.  If it is not possible, use do { } while (0) unless
> the macro needs to act like an expression.
> 
> The wiki should probably also mention the need to use (__extension__
> ({ ... })) when the construct appears in public headers.

I've now edited the wiki page accordingly.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]