diff options
author | David Malcolm <dmalcolm@redhat.com> | 2022-06-16 17:36:38 -0400 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2022-06-16 17:36:38 -0400 |
commit | d3e0da54c16e5383b9b969b7b40f7eadb35b0b8e (patch) | |
tree | 526c8a2985cb0b4992061eb522a97dc96075f8fd /libgo | |
parent | f0da5f0a3161310f2180cccc42a26e0bd02030f0 (diff) | |
download | gcc-d3e0da54c16e5383b9b969b7b40f7eadb35b0b8e.zip gcc-d3e0da54c16e5383b9b969b7b40f7eadb35b0b8e.tar.gz gcc-d3e0da54c16e5383b9b969b7b40f7eadb35b0b8e.tar.bz2 |
c-decl: fix "inform" grouping and conditionalization
Whilst working on SARIF output I noticed some places where followup notes
weren't being properly associated with their errors/warnings in c-decl.cc.
Whilst fixing those I noticed some places where we "inform" after a
"warning" without checking that the warning was actually emitted.
Fixed the various issues seen in gcc/c/c-decl.cc thusly.
gcc/c/ChangeLog:
* c-decl.cc (implicitly_declare): Add auto_diagnostic_group to
group the warning with any note.
(warn_about_goto): Likewise to group error or warning with note.
Bail out if the warning wasn't emitted, to avoid emitting orphan
notes.
(lookup_label_for_goto): Add auto_diagnostic_group to
group the error with the note.
(check_earlier_gotos): Likewise.
(c_check_switch_jump_warnings): Likewise for any error/warning.
Conditionalize emission of the notes.
(diagnose_uninitialized_cst_member): Likewise for warning,
conditionalizing emission of the note.
(grokdeclarator): Add auto_diagnostic_group to group the "array
type has incomplete element type" error with any note.
(parser_xref_tag): Add auto_diagnostic_group to group warnings
with their notes. Conditionalize emission of notes.
(start_struct): Add auto_diagnostic_group to group the
"redefinition of" errors with any note.
(start_enum): Likewise for "redeclaration of %<enum %E%>" error.
(check_for_loop_decls): Likewise for pre-C99 error.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'libgo')
0 files changed, 0 insertions, 0 deletions