diff options
author | Mark Mitchell <mark@codesourcery.com> | 2000-09-12 15:36:23 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2000-09-12 15:36:23 +0000 |
commit | 71ad4a16b65f21156bc89064d51088f065bbe020 (patch) | |
tree | 6061dc4934f59e8337a182cc4b5573716372a658 /gcc | |
parent | c9541287b75be06c0683165086ea34682ce4497f (diff) | |
download | gcc-71ad4a16b65f21156bc89064d51088f065bbe020.zip gcc-71ad4a16b65f21156bc89064d51088f065bbe020.tar.gz gcc-71ad4a16b65f21156bc89064d51088f065bbe020.tar.bz2 |
decl.c (finish_case_label): Given the LABEL_DECL a DECL_CONTEXT.
* decl.c (finish_case_label): Given the LABEL_DECL a
DECL_CONTEXT.
From-SVN: r36365
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/decl.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/inline13.C | 18 |
3 files changed, 24 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 0df451c..e5db96e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2000-09-12 Mark Mitchell <mark@codesourcery.com> + + * decl.c (finish_case_label): Given the LABEL_DECL a + DECL_CONTEXT. + 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com> * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 78a2f76..5653a38 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -5226,6 +5226,7 @@ finish_case_label (low_value, high_value) } label = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE); + DECL_CONTEXT (label) = current_function_decl; if (processing_template_decl) { diff --git a/gcc/testsuite/g++.old-deja/g++.other/inline13.C b/gcc/testsuite/g++.old-deja/g++.other/inline13.C new file mode 100644 index 0000000..a24a74e --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/inline13.C @@ -0,0 +1,18 @@ +// Build don't link: +// Origin: Alexandre Oliva <aoliva@cygnus.com> + +struct foo { + inline void bar(); + foo(); +}; + +inline void foo::bar() { + switch (0) { + case 0: + break; + } +} + +foo::foo() { + bar(); +} |