* decl.c (shadow_label): Don't treat decls as identifiers.
(maybe_push_to_top_level): Clear shadowed_labels.
* pt.c (instantiate_decl): Reset lineno and filename after calling
regenerate_decl_from_template.
From-SVN: r20093
1998-05-27 Mark Mitchell <mark@markmitchell.com>
+ * decl.c (shadow_label): Don't treat decls as identifiers.
+ (maybe_push_to_top_level): Clear shadowed_labels.
+
+ * pt.c (instantiate_decl): Reset lineno and filename after calling
+ regenerate_decl_from_template.
+
* decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
error_mark_node.
current_lang_name = lang_name_cplusplus;
strict_prototype = strict_prototypes_lang_cplusplus;
named_labels = NULL_TREE;
+ shadowed_labels = NULL_TREE;
minimal_parse_mode = 0;
previous_class_type = previous_class_values = NULL_TREE;
processing_specialization = 0;
{
shadowed_labels = tree_cons (NULL_TREE, decl, shadowed_labels);
SET_IDENTIFIER_LABEL_VALUE (name, NULL_TREE);
- SET_IDENTIFIER_LABEL_VALUE (decl, NULL_TREE);
}
return lookup_label (name);
goto out;
}
+ regenerate_decl_from_template (d, td);
+
+ /* We already set the file and line above. Reset them now in case
+ they changed as a result of calling regenerate_decl_from_template. */
lineno = DECL_SOURCE_LINE (d);
input_filename = DECL_SOURCE_FILE (d);
- regenerate_decl_from_template (d, td);
-
if (TREE_CODE (d) == VAR_DECL)
{
DECL_IN_AGGR_P (d) = 0;
--- /dev/null
+// Build don't link:
+
+template <class T>
+struct S {};
+
+template <class T>
+inline void g(T t)
+{
+ here:
+ S<T> st;
+ goto here;
+}
+
+template <class T>
+void f(T t)
+{
+ here:
+ g(t);
+ goto here;
+}
+
+void h()
+{
+ f(3);
+}