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:
Mark Mitchell 2000-09-12 15:36:23 +00:00 committed by Mark Mitchell
parent c9541287b7
commit 71ad4a16b6
3 changed files with 24 additions and 0 deletions

View File

@ -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,

View File

@ -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)
{

View 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();
}