aboutsummaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorMartin Sebor <msebor@redhat.com>2018-11-09 17:32:52 +0000
committerMartin Sebor <msebor@gcc.gnu.org>2018-11-09 10:32:52 -0700
commit79a2c4281c7dcaa6a138d24fd037c62453a12bde (patch)
treedff179677c863457f73ef49310ef719591c305e7 /libgo
parent900dab1338b45c8fa8d1b315dce53712b857da1d (diff)
downloadgcc-79a2c4281c7dcaa6a138d24fd037c62453a12bde.zip
gcc-79a2c4281c7dcaa6a138d24fd037c62453a12bde.tar.gz
gcc-79a2c4281c7dcaa6a138d24fd037c62453a12bde.tar.bz2
PR middle-end/81824 - Warn for missing attributes with function aliases
gcc/c-family/ChangeLog: PR middle-end/81824 * c-attribs.c (handle_copy_attribute): New function. gcc/cp/ChangeLog: PR middle-end/81824 * pt.c (warn_spec_missing_attributes): Move code to attribs.c. Call decls_mismatched_attributes. gcc/ChangeLog: PR middle-end/81824 * attribs.c (has_attribute): New helper function. (decls_mismatched_attributes, maybe_diag_alias_attributes): Same. * attribs.h (decls_mismatched_attributes): Declare. * cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes. (maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_. * common.opt (-Wattribute-alias): Take an argument. (-Wno-attribute-alias): New option. * doc/extend.texi (Common Function Attributes): Document copy. (Common Variable Attributes): Same. * doc/invoke.texi (-Wmissing-attributes): Document enhancement. (-Wattribute-alias): Document new option argument. gcc/testsuite/ChangeLog: PR middle-end/81824 * gcc.dg/Wattribute-alias.c: New test. * gcc.dg/Wmissing-attributes.c: New test. * gcc.dg/attr-copy.c: New test. * gcc.dg/attr-copy-2.c: New test. * gcc.dg/attr-copy-3.c: New test. * gcc.dg/attr-copy-4.c: New test. From-SVN: r265980
Diffstat (limited to 'libgo')
0 files changed, 0 insertions, 0 deletions