re PR c/28744 (externally_visible attribute not effective with prior declaration...
authorJakub Jelinek <jakub@redhat.com>
Thu, 17 Aug 2006 11:52:26 +0000 (13:52 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 17 Aug 2006 11:52:26 +0000 (13:52 +0200)
commit343d4b27bf3dfdd3042389dbdaff2afe427864f6
tree1079f5fa46aa27a5d4a1d75e9246bdc01981cd50
parent7ffaaddcdaf19adac105e8481e83ef32c059b641
re PR c/28744 (externally_visible attribute not effective with prior declaration of symbol.)

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
gcc/ChangeLog
gcc/c-common.c
gcc/cgraph.h
gcc/cgraphunit.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/parse/attr-externally-visible-1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/parse/attr-externally-visible-2.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/attr-externally-visible-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/attr-externally-visible-2.c [new file with mode: 0644]