[RFC][PATCH 1/4][BZ 17083] getaddrinfo: Add comments for #else and #endif directives

Joseph Myers joseph@codesourcery.com
Tue Sep 12 14:30:00 GMT 2017


On Mon, 11 Sep 2017, DJ Delorie wrote:

> ?ukasz Stelmach <stlman@poczta.fm> writes:
> >  #if __BYTE_ORDER == __BIG_ENDIAN
> >  # define htonl_c(n) n
> > -#else
> > +#else  /* __BYTE_ORDER == __BIG_ENDIAN */
> >  # define htonl_c(n) __bswap_constant_32 (n)
> > -#endif
> > +#endif	/* __BYTE_ORDER == __BIG_ENDIAN */
> 
> What's our policy on inverting the logic sense in these comments when
> they refer to the #else clause?

I'd expect comments to follow what the GNU Coding Standards say 
("@samp{#else} should have a comment describing the condition @emph{and 
sense} of the code that follows.").

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Libc-alpha mailing list