This is the mail archive of the gcc-patches@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]

Re: [C PATCH] Add -Wdiscarded-qualifiers (PR c/43245)


On 04/29/14 15:20, Marek Polacek wrote:
I think we should have an option to turn off various "discards
qualifier" warnings (only for C), or to make them hard errors.
This patch adds new option, called -Wdiscarded-qualifiers (as
suggested in the BZ) for that.

Regtested/bootstrapped on x86_64-linux, ok for trunk?

2014-04-29  Marek Polacek  <polacek@redhat.com>

	PR c/43245
	* doc/invoke.texi: Document -Wdiscarded-qualifiers.
c-family/
	* c.opt (Wdiscarded-qualifiers): Add.
c/
	* c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
	instead of 0 to WARN_FOR_QUALIFIERS.
testsuite/
	* gcc.dg/pr43245.c: New test.
OK.  Thanks.

Jeff


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