mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-11 07:26:49 +08:00
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
This commit is contained in:
parent
c9541287b7
commit
71ad4a16b6
@ -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,
|
||||
|
@ -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)
|
||||
{
|
||||
|
18
gcc/testsuite/g++.old-deja/g++.other/inline13.C
Normal file
18
gcc/testsuite/g++.old-deja/g++.other/inline13.C
Normal file
@ -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();
|
||||
}
|
Loading…
Reference in New Issue
Block a user