[BusyBox] Where do I report a compiler bug?
rob at landley.net
Mon Oct 13 18:46:19 UTC 2003
On Monday 13 October 2003 08:59, Lars Kellogg-Stedman wrote:
> I don't believe this is a compiler bug. The C programming FAQ says that
> this behavior is undefined:
> From <http://www.eskimo.com/~scs/C-faq/q3.1.html>:
> [3.1] Why doesn't this code:
> a[i] = i++;
Sigh. Okay, it works properly if there's a sequencing point (&&, ||, for(;;),
etc... A quick grep even found a code example in linux-kernel that uses a
comma, which implies function arguments are happy too.)
It's kind of annoying that there's something special about lvalues, since I
can rely on "a=(get_bits(8)<<16)|(get_bits(8)<<8)||get_bits(8)" to work
properly, and that has the side effect of reading from a file which cares
rather a LOT about sequencing. Oh well...
> > > Are you sure this is a compiler bug? Or is it undefined behaviour?
> > Yes, I'm sure it's a compiler bug.
Nobody ever said "sure" was the same thing as "right". :)
I'd already changed it to use "memmove" anyway, since gcc will probably inline
that and it'd be optimised assembly if so...
More information about the busybox