pt.c (convert_nontype_argument): Check against type_referred_to.
authorBenjamin Kosnik <bkoz@rhino.cygnus.com>
Wed, 14 Oct 1998 21:16:37 +0000 (21:16 +0000)
committerBenjamin Kosnik <bkoz@gcc.gnu.org>
Wed, 14 Oct 1998 21:16:37 +0000 (21:16 +0000)
~
1998-10-14 Benjamin Kosnik  <bkoz@rhino.cygnus.com>
        * 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

gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/cp/pt.c

index 0e5b319822e2550bb3eb943fbca3d40d959e03cc..b98eb8282e45705a2ce06d28908d875e9d9e60d8 100644 (file)
@@ -1,3 +1,9 @@
+1998-10-14 Benjamin Kosnik  <bkoz@rhino.cygnus.com>
+
+       * 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  <mark@markmitchell.com>
 
        * pt.c (lookup_template_class): Add comment.
index 90b2e53d5be5ea50b7b2d21356739c94b40d16cb..8d9337f164ff02dcb59f14003567bab6086f9c2b 100644 (file)
@@ -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);
index c836fbd450560239ea144ec402a02058a4f4f6f1..c3e2d2ebdc24fd37433b5d9a60f1aa24e4314ecf 100644 (file)
@@ -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;