PR c/28744
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 17 Aug 2006 11:52:26 +0000 (11:52 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 17 Aug 2006 11:52:26 +0000 (11:52 +0000)
commitba12ea31b1c211d2aa9d3f9c35f34156adbe5634
tree1079f5fa46aa27a5d4a1d75e9246bdc01981cd50
parent9ef537cbd53e9f901b1865e9f9fd2726ad274aed
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116222 138bc75d-0d04-0410-961f-82ee72b054a4
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]