This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C/C++ PATCH] Implement -Wshift-negative-value (PR c/65179)
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Marek Polacek <polacek at redhat dot com>
- Cc: Martin Sebor <msebor at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Jason Merrill <jason at redhat dot com>
- Date: Sat, 25 Apr 2015 20:13:08 +0000
- Subject: Re: [C/C++ PATCH] Implement -Wshift-negative-value (PR c/65179)
- Authentication-results: sourceware.org; auth=none
- References: <20150422183633 dot GI28950 at redhat dot com> <5539B46B dot 8030704 at redhat dot com> <20150424162703 dot GK2813 at redhat dot com> <553AB64B dot 1070508 at redhat dot com> <20150425173052 dot GL2813 at redhat dot com>
On Sat, 25 Apr 2015, Marek Polacek wrote:
> + pedwarn (location, OPT_Wshift_negative_value,
> + "left shift of negative value");
Use of pedwarn is always suspect for something only undefined at runtime;
it must not produce an error with -pedantic-errors in any context where a
constant expression is not required.
--
Joseph S. Myers
joseph@codesourcery.com