[PATCH][stage1] Add option suggestion for -Werror=foo and corresponding pragma.

Martin Liška mliska@suse.cz
Tue Mar 5 14:15:00 GMT 2019


Hi.

The patch extends option suggestion for both -Werror and corresponding
pragram.

Patch can bootstrap on x86_64-linux-gnu and survives regression tests.

Ready to be installed after stage1 opens?
Thanks,
Martin

gcc/ChangeLog:

2019-03-05  Martin Liska  <mliska@suse.cz>

	* opts.c (enable_warning_as_error): Provide hints
	for unknown options.

gcc/c-family/ChangeLog:

2019-03-05  Martin Liska  <mliska@suse.cz>

	* c-pragma.c (handle_pragma_diagnostic): Provide hints
	for unknown options.

gcc/testsuite/ChangeLog:

2019-03-05  Martin Liska  <mliska@suse.cz>

	* gcc.dg/Werror-13.c: Add new tests for it.
	* gcc.dg/pragma-diag-6.c: Likewise.
---
 gcc/c-family/c-pragma.c              | 13 +++++++++++--
 gcc/opts.c                           | 17 ++++++++++++++---
 gcc/testsuite/gcc.dg/Werror-13.c     | 12 +++++++-----
 gcc/testsuite/gcc.dg/pragma-diag-6.c |  3 +++
 4 files changed, 35 insertions(+), 10 deletions(-)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-option-suggestion-for-Werror-foo-and-correspondi.patch
Type: text/x-patch
Size: 4971 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190305/89bf7a99/attachment.bin>


More information about the Gcc-patches mailing list