This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/68979] [6 Regression] error: left operand of shift expression â(-1 << 4)â is negative


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]