attr-externally-visible-2.c
1.1 KB
-
re PR c/28744 (externally_visible attribute not effective with prior declaration of symbol.) · 343d4b27
PR c/28744 * cgraph.h (struct cgraph_node): Remove externally_visible bitfield. * cgraphunit.c (process_function_and_variable_attributes): Set local.externally_visible rather than externally_visible. PR c/28744 * c-common.c (handle_externally_visible_attribute): First look at TREE_CODE and only if it is function or var decl, check for non-public objects. Don't warn for DECL_EXTERNAL. * cgraphunit.c (process_function_and_variable_attributes): Warn if externally_visible attribute is used on non-public object. * gcc.dg/attr-externally-visible-1.c: New test. * gcc.dg/attr-externally-visible-2.c: New test. * g++.dg/parse/attr-externally-visible-1.C: New test. * g++.dg/parse/attr-externally-visible-2.C: New test. From-SVN: r116222
Jakub Jelinek committed