[Bug c/45831] 0 = 10 (with -O0, 0 = 0 with -O1, but 10 = 10 expected)

manu at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Sep 29 17:04:00 GMT 2010


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45831

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu.org

--- Comment #7 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2010-09-29 15:25:11 UTC ---
Andrew, I really admire your patience explaining the details, but I think we
should just point people to good references from the start

http://c-faq.com/ansi/undef.html

I think that provides far more info that we can give here, save us time, and
avoids the frustration of users having to ask for more and more details until
they understand the issue.

And we warn by default.

warning: left shift count is negative

I think the warning should mention "undefined"

warning: negative left shift count is undefined



More information about the Gcc-bugs mailing list