re PR c++/31187 (extern declaration of variable in anonymous namespace prevents use...
authorJason Merrill <jason@redhat.com>
Mon, 2 Apr 2007 17:49:21 +0000 (13:49 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 2 Apr 2007 17:49:21 +0000 (13:49 -0400)
commitc3b7031d9643c03eed891a96cfb528a4f5ffa78e
treee654734c754b142e86f0adfa0fd4225aa223605a
parenta0036853d2b6260c0a322da8d411dcebd3ac4f9e
re PR c++/31187 (extern declaration of variable in anonymous namespace prevents use of its address as template argument)

        PR c++/31187
        * typeck.c (cp_type_readonly): New fn.
        * cp-tree.h: Declare it.
        * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
        (cp_finish_decl): Not here.

        * g++.dg/ext/visibility/anon3.C: New test.

From-SVN: r123432
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl.c
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/visibility/anon3.C [new file with mode: 0644]