This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/17679] Can't use htole*, htobe*, __bswap* functions in static/global context
- From: "joseph at codesourcery dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 04 Dec 2014 16:09:22 +0000
- Subject: [Bug libc/17679] Can't use htole*, htobe*, __bswap* functions in static/global context
- Auto-submitted: auto-generated
- References: <bug-17679-131 at http dot sourceware dot org/bugzilla/>
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.