https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71024
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Author: mpolacek Date: Wed May 11 17:07:37 2016 New Revision: 236129 URL: https://gcc.gnu.org/viewcvs?rev=236129&root=gcc&view=rev Log: PR c++/71024 * c-common.c (diagnose_mismatched_attributes): New function. * c-common.h (diagnose_mismatched_attributes): Declare. * c-decl.c (diagnose_mismatched_decls): Factor out code to diagnose_mismatched_attributes and call it. * decl.c (duplicate_decls): Call diagnose_mismatched_decls. * c-c++-common/attributes-3.c: New test. Added: trunk/gcc/testsuite/c-c++-common/attributes-3.c Modified: trunk/gcc/c-family/ChangeLog trunk/gcc/c-family/c-common.c trunk/gcc/c-family/c-common.h trunk/gcc/c/ChangeLog trunk/gcc/c/c-decl.c trunk/gcc/cp/ChangeLog trunk/gcc/cp/decl.c trunk/gcc/testsuite/ChangeLog