This is the mail archive of the glibc-bugs@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]

[Bug libc/17679] Can't use htole*, htobe*, __bswap* functions in static/global context


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

--- Comment #5 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
I think it should be valid to do e.g.

int a;
void foo (int (*x)[htonl (a)]);

(where [htonl (a)] is equivalent to [*]).  Or, for that matter,

char b[sizeof (htonl (a))];

These certainly aren't the only standard functions / macros defined in a 
way causing problems with that, and maybe a compiler change to allow ({}) 
outside functions (only giving an error if the resulting expression's 
value gets used) would be the best fix.

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


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