On Tue, 2019-03-05 at 15:14 +0100, Martin Liška wrote: > 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
Good idea - thanks. The patch also fixes some quoting issues. Ideally we'd also provide fix-it hints for the unknown options - but I'm guessing we probably don't have accurate enough location_t values for that - are the location_t values just for the whole of the line containing the pragma, or do they have fine-grained token information? That said, the patch is OK for next stage 1 as-is. Dave > gcc/ChangeLog: > > 2019-03-05 Martin Liska <mli...@suse.cz> > > * opts.c (enable_warning_as_error): Provide hints > for unknown options. > > gcc/c-family/ChangeLog: > > 2019-03-05 Martin Liska <mli...@suse.cz> > > * c-pragma.c (handle_pragma_diagnostic): Provide hints > for unknown options. > > gcc/testsuite/ChangeLog: > > 2019-03-05 Martin Liska <mli...@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(-) > >