From: Benjamin Kosnik Date: Wed, 14 Oct 1998 21:16:37 +0000 (+0000) Subject: pt.c (convert_nontype_argument): Check against type_referred_to. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5b2e9bf44d3ef44eff617b1ac5fe36eed898815c;p=gcc.git pt.c (convert_nontype_argument): Check against type_referred_to. ~ 1998-10-14 Benjamin Kosnik * pt.c (convert_nontype_argument): Check against type_referred_to. * decl.c (grokvardecl): Check for declarator name before building DECL_ASSEMBLER_NAME. From-SVN: r23097 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 0e5b319822e..b98eb8282e4 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +1998-10-14 Benjamin Kosnik + + * pt.c (convert_nontype_argument): Check against type_referred_to. + * decl.c (grokvardecl): Check for declarator name before building + DECL_ASSEMBLER_NAME. + 1998-10-14 Mark Mitchell * pt.c (lookup_template_class): Add comment. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 90b2e53d5be..8d9337f164f 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -8273,7 +8273,7 @@ grokvardecl (type, declarator, specbits_in, initialized, constp, in_namespace) { tree context = in_namespace ? in_namespace : current_namespace; decl = build_decl (VAR_DECL, declarator, complete_type (type)); - if (context != global_namespace && namespace_bindings_p () + if (declarator && context != global_namespace && namespace_bindings_p () && current_lang_name != lang_name_c) DECL_ASSEMBLER_NAME (decl) = build_static_name (context, declarator); diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index c836fbd4505..c3e2d2ebdc2 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -2583,7 +2583,7 @@ convert_nontype_argument (type, expr) if (fn == error_mark_node) return error_mark_node; - my_friendly_assert (comptypes (type, TREE_TYPE (fn), 1), + my_friendly_assert (comptypes (type_referred_to, TREE_TYPE (fn), 1), 0); return fn;