This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix PR C/18479, visibility and structs and C


The problem is that the C TYPE_NAME of a type for a struct is a
IDENTIFIER_NODE but in C++ it is TYPE_DECL.  We just did not take
this into account in handle_visibility_attribute.  This patch fixes
the problem and we warn about the attribute being ignored also.

OK? Bootstrapped and tested on powerpc-darwin with no regressions.

Thanks,
Andrew Pinski

ChangeLog:
	* c-common.c (handle_visibility_attribute): When the type decl
	is really a identifier node, warn about being ignored and return.

Attachment: temp.diff.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]