This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/68979] [6 Regression] error: left operand of shift expression â(-1 << 4)â is negative
- From: "trippels at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 18 Dec 2015 13:00:07 +0000
- Subject: [Bug c++/68979] [6 Regression] error: left operand of shift expression â(-1 << 4)â is negative
- Auto-submitted: auto-generated
- References: <bug-68979-4 at http dot gcc dot gnu dot org/bugzilla/>
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.