diff options
author | Jason Merrill <jason@yorick.cygnus.com> | 1998-08-17 18:46:43 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1998-08-17 14:46:43 -0400 |
commit | 2d91446123f8320796a7ad57de5d0a79dc69ea92 (patch) | |
tree | 5d1f9449d1f506200bdf34a0648086b17776ad7b | |
parent | 09007174da82d2e9fbc0897b12b0f24ad67c7495 (diff) | |
download | gcc-2d91446123f8320796a7ad57de5d0a79dc69ea92.zip gcc-2d91446123f8320796a7ad57de5d0a79dc69ea92.tar.gz gcc-2d91446123f8320796a7ad57de5d0a79dc69ea92.tar.bz2 |
decl.c (grokdeclarator): Catch parm with pointer to array of unknown bound here...
* decl.c (grokdeclarator): Catch parm with pointer to array of
unknown bound here...
* method.c (process_overload_item): ...not here.
From-SVN: r21800
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/decl.c | 5 | ||||
-rw-r--r-- | gcc/cp/method.c | 2 |
3 files changed, 10 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 907b82c..af531e9 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 932fb69..d6249a5 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -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. */ diff --git a/gcc/cp/method.c b/gcc/cp/method.c index 16ecbf2..7084810 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -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); |