[Mesa-dev] [Bug 80266] Many instances of 1<<31, which is undefined in C99

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Jun 20 12:22:34 PDT 2014


https://bugs.freedesktop.org/show_bug.cgi?id=80266

--- Comment #10 from Patrick Baggett <baggett.patrick at gmail.com> ---
(In reply to comment #5)
> Does gcc warn about this? Are you _sure_ that (signed int)1 << 31 is illegal
> in C99?

And as tedious as this is to mention, C99 section 6.5.7.4 does state this is
undefined behavior. I know the "C abstract machine" is far removed from real
problems with drivers and whatnot -- and I appreciate the awesome work you all
do on Mesa. I just wanted to clarify that there is spec support for this claim.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140620/2f0f1f05/attachment.html>


More information about the mesa-dev mailing list