decl.c (grokdeclarator): Don't treat [] as indicating a zero-sized array in a typedef.
authorMark Mitchell <mark@codesourcery.com>
Thu, 20 May 1999 18:10:28 +0000 (18:10 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Thu, 20 May 1999 18:10:28 +0000 (18:10 +0000)
* decl.c (grokdeclarator): Don't treat [] as indicating a
zero-sized array in a typedef.

From-SVN: r27070

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

index d306b09b5e91b53260ab87c6ea5e824c86a32980..70e3a246fe919ec6c07af930e241e56502871b9a 100644 (file)
@@ -1,5 +1,8 @@
 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
 
+       * decl.c (grokdeclarator): Don't treat [] as indicating a
+       zero-sized array in a typedef.
+
        * call.c (build_object_call): Don't look at DECL_NAME for a type.
        (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
        (typeck.c): Or TYPE_MAIN_VARIANT for a type.
index ebb15d18172036a514371d58da1ac45e52ef86d6..111ce222fe9d8f6feac7e99a13a6e3f2d421a70b 100644 (file)
@@ -10322,7 +10322,8 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
              continue;
 
            /* VC++ spells a zero-sized array with [].  */
-           if (size == NULL_TREE && decl_context == FIELD && ! staticp)
+           if (size == NULL_TREE && decl_context == FIELD && ! staticp
+               && ! RIDBIT_SETP (RID_TYPEDEF, specbits))
              size = integer_zero_node;
 
            if (size)