From 29d2485270f422a4b89bfa79e448843509cd0568 Mon Sep 17 00:00:00 2001 From: Martin Sebor Date: Sat, 5 Jan 2019 00:57:30 +0000 Subject: PR c/88546 - Copy attribute unusable for weakrefs gcc/c-family/ChangeLog: PR c/88546 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf. Handle C++ empty throw specification and C11 _Noreturn. (has_attribute): Also handle C11 _Noreturn. gcc/ChangeLog: PR c/88546 * attribs.c (decls_mismatched_attributes): Avoid warning for attribute leaf. gcc/testsuite/ChangeLog: PR c/88546 * g++.dg/ext/attr-copy.C: New test. * gcc.dg/attr-copy-4.c: Disable macro expansion tracking. * gcc.dg/attr-copy-6.c: New test. * gcc.dg/attr-copy-7.c: New test. From-SVN: r267591 --- libgfortran/libgfortran.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libgfortran/libgfortran.h') diff --git a/libgfortran/libgfortran.h b/libgfortran/libgfortran.h index 04188066300..6b4775a1365 100644 --- a/libgfortran/libgfortran.h +++ b/libgfortran/libgfortran.h @@ -202,7 +202,7 @@ extern int __mingw_snprintf (char *, size_t, const char *, ...) # define iexport(x) iexport1(x, IPREFIX(x)) # define iexport1(x,y) iexport2(x,y) # define iexport2(x,y) \ - extern __typeof(x) PREFIX(x) __attribute__((__alias__(#y))) + extern __typeof(x) PREFIX(x) __attribute__((__alias__(#y), __copy__ (x))) #else # define export_proto(x) sym_rename(x, PREFIX(x)) # define export_proto_np(x) extern char swallow_semicolon -- cgit v1.2.3