[Bug c++/68979] [6 Regression] error: left operand of shift expression ‘?=(-1 << 4)=?UTF-8?Q?’ is negative

trippels at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Dec 18 13:00:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68979

--- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
(In reply to Marek Polacek from comment #1)
> Why do you think this is a bug?  Note that -1 << 4 is rejected in a context
> where an integer constant expression is required only in C++11/14.

I think that erroring out in this case is too harsh from a QOI standpoint.
A warning should be sufficient.


More information about the Gcc-bugs mailing list