[Bug c/81824] Warn for missing attributes with function aliases

aoliva at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jul 18 00:39:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81824

--- Comment #18 from Alexandre Oliva <aoliva at gcc dot gnu.org> ---
Author: aoliva
Date: Thu Jul 18 00:38:45 2019
New Revision: 273563

URL: https://gcc.gnu.org/viewcvs?rev=273563&root=gcc&view=rev
Log:
-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.

Added:
    trunk/gcc/testsuite/g++.dg/Wmissing-attributes-1.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/attribs.c
    trunk/gcc/testsuite/ChangeLog


More information about the Gcc-bugs mailing list