[Bug libc/17082] htons et al.: statement-expressions prevent use on global scope with -O1 and higher

jsm28 at gcc dot gnu.org sourceware-bugzilla@sourceware.org
Tue Feb 6 22:03:00 GMT 2018


https://sourceware.org/bugzilla/show_bug.cgi?id=17082

Joseph Myers <jsm28 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |2.28

--- Comment #3 from Joseph Myers <jsm28 at gcc dot gnu.org> ---
The particular cases of htons/htonl are fixed for 2.28 by my commit.  Since bug
reported in Bugzilla should be for well-defined issues that are not susceptible
to being partially fixed, have clear consensus that there is a bug and are not
open-ended, I am thus closing the bug as fixed.

If you identify other cases of ({}) being used unnecessarily in macros in
installed headers, please file separate bugs for those, each bug only covering
a single macro or group of closely-related macros in the same header.  Note
that such bugs should only be where you have identified the use of ({}) as
unnecessary (where an inline function would be a suitable substitute).  An
inline function is *not* a suitable replacement in cases where the macro
returns memory allocated with alloca, or where it is type-generic so the type
of the inline function or variables therein would depend on the types of
arguments passed; such cases generally need to remain using ({}).

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Glibc-bugs mailing list