decl.c (grokdeclarator): Catch parm with pointer to array of unknown bound here...
authorJason Merrill <jason@yorick.cygnus.com>
Mon, 17 Aug 1998 18:46:43 +0000 (18:46 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 17 Aug 1998 18:46:43 +0000 (14:46 -0400)
* decl.c (grokdeclarator): Catch parm with pointer to array of
unknown bound here...
* method.c (process_overload_item): ...not here.

From-SVN: r21800

gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/cp/method.c

index 907b82ca77aa0d4bca71dc2c75711d0c09f4fc9f..af531e9b75f8e1168e1548e0b509524f6a3aab52 100644 (file)
@@ -1,5 +1,9 @@
 1998-08-17  Jason Merrill  <jason@yorick.cygnus.com>
 
+       * decl.c (grokdeclarator): Catch parm with pointer to array of
+       unknown bound here...
+       * method.c (process_overload_item): ...not here.
+
        * gxxint.texi: Remove obsolete documentation of overloading code.
 
        * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
index 932fb694ad975c77697122e64f44fb410fcd8acd..d6249a5ab9f99d7fff116c8d0d8b0b947fb2bc01 100644 (file)
@@ -9607,6 +9607,11 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
              type = TREE_TYPE (type);
            }
 
+         if (decl_context == PARM && TREE_CODE (type) == ARRAY_TYPE
+             && TYPE_DOMAIN (type) == NULL_TREE)
+           cp_error ("parameter type includes pointer to array of unknown bound `%T'",
+                     type);
+
          /* Merge any constancy or volatility into the target type
             for the pointer.  */
 
index 16ecbf2d7daf7e1b4ba5de1de486d1553541ab26..7084810dcbc3a53c12576b0681597b1fec53278e 100644 (file)
@@ -1241,7 +1241,7 @@ process_overload_item (parmtype, extra_Gcode)
 
         OB_PUTC ('A');
         if (TYPE_DOMAIN (parmtype) == NULL_TREE)
-          error("pointer/reference to array of unknown bound in parm type");
+         OB_PUTC ('_');
         else
          {
            tree length = array_type_nelts (parmtype);