diff options
| author | Mark Mitchell <mark@codesourcery.com> | 2006-09-11 00:40:15 +0000 |
|---|---|---|
| committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2006-09-11 00:40:15 +0000 |
| commit | bc70af526c6b2243c68242d0aa6a48da9da4003d (patch) | |
| tree | 638e093b62285063b24863274ca086abe9301c4b /gcc/cp/cp-objcp-common.c | |
| parent | d35763beeab40ff256e819535bc6cc8eda90e6ce (diff) | |
| download | gcc-bc70af526c6b2243c68242d0aa6a48da9da4003d.zip gcc-bc70af526c6b2243c68242d0aa6a48da9da4003d.tar.gz gcc-bc70af526c6b2243c68242d0aa6a48da9da4003d.tar.bz2 | |
re PR c++/28991 (Static constructor emitted instead of initialized variable)
PR c++/28991
* cp-objcp-common.c (cxx_staticp): New function.
* cp-objcp-common.h (LANG_HOOOKS_STATICP): Use it.
* cp-tree.h (cxx_staticp): New function.
PR c++/289991
* g++.dg/init/static3.C: New test.
From-SVN: r116838
Diffstat (limited to 'gcc/cp/cp-objcp-common.c')
| -rw-r--r-- | gcc/cp/cp-objcp-common.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/cp/cp-objcp-common.c b/gcc/cp/cp-objcp-common.c index cb8369c..f40be96 100644 --- a/gcc/cp/cp-objcp-common.c +++ b/gcc/cp/cp-objcp-common.c @@ -185,6 +185,21 @@ cxx_types_compatible_p (tree x, tree y) return 0; } +tree +cxx_staticp (tree arg) +{ + switch (TREE_CODE (arg)) + { + case BASELINK: + return staticp (BASELINK_FUNCTIONS (arg)); + + default: + break; + } + + return NULL_TREE; +} + /* Stubs to keep c-opts.c happy. */ void push_file_scope (void) |
