-Wmissing-attributes: check that we avoid duplicates and false positives
The initial patch for PR 81824 fixed various possibilities of
-Wmissing-attributes reporting duplicates and false positives. The
test that avoided them was a little obscure, though, so this patch
rewrites it into a more self-evident form.
The patch also adds a testcase that already passed, but that
explicitly covers some of the possibilities of reporting duplicates
and false positives that preexisting tests did not cover.
for gcc/ChangeLog
PR middle-end/81824
* attribs.c (decls_mismatched_attributes): Simplify the logic
that avoids duplicates and false positives.
for gcc/testsuite/ChangeLog
PR middle-end/81824
* g++.dg/Wmissing-attributes-1.C: New. Some of its fragments
are from Martin Sebor.
From-SVN: r273563