Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: rump and htonl() in constants
On Sun, Mar 01, 2015 at 10:26:10AM +0000, Justin Cormack wrote:
> On 28 February 2015 at 21:38, Joerg Sonnenberger
> <joerg%britannica.bec.de@localhost> wrote:
> > On Sat, Feb 28, 2015 at 01:16:11PM -0500, Christos Zoulas wrote:
> >> On Feb 28, 5:46pm, prlw1%cam.ac.uk@localhost (Patrick Welche) wrote:
> >> -- Subject: Re: rump and htonl() in constants
> >>
> >> | Yes - I have DBG=-g -O0 in Makefile.rump
> >> |
> >> | I thought that would help trying to step through a rump kernel in gdb - not
> >> | a good idea? (removing now)
> >> |
> >> | I suppose that is why no one else is seeing this...
> >>
> >> We could make this compile by adding an ifdef __OPTIMIZE__...
> >
> > No, if you want to fix it make it use fixed size conversion macro from
> > sys/endian.h, it takes care of handling constants.
>
> It does for some architectures, but not for x86. Arm checks with
> __builtin_constant_p and has a constant fallback, while x86 does not
> it just uses assembly implementation always.
>
> That seems to be what needs fixing...
Seems to fit:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19449
trunk/gcc/testsuite/gcc.c-torture/execute/pr19449.c
passes, but Ryan Lortie's test case doesn't => sounds like a gcc bug.
So what should we do? Work around it? Stick to clang?
Cheers,
Patrick
Home |
Main Index |
Thread Index |
Old Index