PR c++/93804 - exempt extern C headers from -Wredundant-tags
authorMartin Sebor <msebor@redhat.com>
Mon, 24 Feb 2020 17:14:16 +0000 (10:14 -0700)
committerMartin Sebor <msebor@redhat.com>
Mon, 24 Feb 2020 17:14:16 +0000 (10:14 -0700)
commitb73547e40e0b2b6621feec59c9cc65312eddbc6d
tree7413d2624f1b28fb895787b1e9cc8ce08a3f462e
parent004f2c07b6d3fa543f0fe86c55a7b3c227de2bb6
PR c++/93804 - exempt extern C headers from -Wredundant-tags

gcc/cp/ChangeLog:

PR c++/93804
* parser.c (cp_parser_check_class_key): Avoid issuing -Wredundant-tags
in shared C/C++ code in headers.

gcc/testsuite/ChangeLog:

PR c++/93804
* g++.dg/warn/Wredundant-tags-4.C: New test.
* g++.dg/warn/Wredundant-tags-5.C: New test.
* g++.dg/warn/Wredundant-tags-5.h: New test.
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/warn/Wredundant-tags-4.C [new file with mode: 0644]
gcc/testsuite/g++.dg/warn/Wredundant-tags-5.C [new file with mode: 0644]
gcc/testsuite/g++.dg/warn/Wredundant-tags-5.h [new file with mode: 0644]