diff options
author | Mark Mitchell <mark@codesourcery.com> | 1999-05-20 18:10:28 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 1999-05-20 18:10:28 +0000 |
commit | e8ea7036e91d0721e08ab2d8db7ff0b8b9fb2d90 (patch) | |
tree | 0e951aa1fb372eed3245fd1fe4fe45a76be446bb | |
parent | f0bcd16877fbedf2484a599af96321bec1274e2a (diff) | |
download | gcc-e8ea7036e91d0721e08ab2d8db7ff0b8b9fb2d90.zip gcc-e8ea7036e91d0721e08ab2d8db7ff0b8b9fb2d90.tar.gz gcc-e8ea7036e91d0721e08ab2d8db7ff0b8b9fb2d90.tar.bz2 |
decl.c (grokdeclarator): Don't treat [] as indicating a zero-sized array in a typedef.
* decl.c (grokdeclarator): Don't treat [] as indicating a
zero-sized array in a typedef.
From-SVN: r27070
-rw-r--r-- | gcc/cp/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/cp/decl.c | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index d306b09..70e3a24 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index ebb15d1..111ce22 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -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) |