diff options
author | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-17 10:05:31 +0000 |
---|---|---|
committer | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-17 10:05:31 +0000 |
commit | 1d75985e13570de459d892a0a6f0d8c14d968dd5 (patch) | |
tree | e34855fe7b427f6d66bd4533fcc51da52d25cfb4 /gcc/testsuite | |
parent | 313d903f1246d51146be2554cc3b43119cba83a8 (diff) | |
download | gcc-1d75985e13570de459d892a0a6f0d8c14d968dd5.tar.gz |
cp:
* cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
* decl.c (grokdeclarator): Don't reject void parms here.
(require_complete_types_for_parms): Simplify, use
complete_type_or_else.
(grokparms): Remove bitrot. Remove funcdef parm.
Deal with ellipsis parm lists here.
* semantics.c (finish_parmlist): Don't append void_list_node
here. Set PARMLIST_ELLIPSIS_P.
testsuite:
* g++.old-deja/g++.other/incomplete.C: Add more tests.
* g++.old-deja/g++.pt/crash9.C: Mark new expected error.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37517 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/incomplete.C | 15 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/crash9.C | 2 |
3 files changed, 19 insertions, 3 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d0c3dbf8adb..b6acd130c18 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2000-11-17 Nathan Sidwell <nathan@codesourcery.com> + + * g++.old-deja/g++.other/incomplete.C: Add more tests. + * g++.old-deja/g++.pt/crash9.C: Mark new expected error. + 2000-11-16 Nick Clifton <nickc@redhat.com> * gcc.c-torture/execute/nestfunc-2.c: New test. diff --git a/gcc/testsuite/g++.old-deja/g++.other/incomplete.C b/gcc/testsuite/g++.old-deja/g++.other/incomplete.C index 0c230c18777..f5e9a581faf 100644 --- a/gcc/testsuite/g++.old-deja/g++.other/incomplete.C +++ b/gcc/testsuite/g++.old-deja/g++.other/incomplete.C @@ -1,5 +1,16 @@ // Build don't link: -struct S; +// gcc represents non-ellipsis parmlists by terminating them with +// a void parm. We need to distinguish between a parmlist of (void), and +// some ill-formed ones. -void f(S s) {} // ERROR - incomplete type +struct S; // ERROR - forward ref + +void f(S); // ok +void f(S s) {} // ERROR - incomplete type +void j (int){}; // ok +void k (){}; // ok +void q (void){} // ok +void t (void t); // ERROR - incomplete +void r (void, ...); // ERROR - incomplete +void s (void const); // ERROR - incomplete diff --git a/gcc/testsuite/g++.old-deja/g++.pt/crash9.C b/gcc/testsuite/g++.old-deja/g++.pt/crash9.C index 297b8accaad..d72699d2360 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/crash9.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/crash9.C @@ -3,7 +3,7 @@ template <class T> void f(T) {} // ERROR - parameter has incomplete type -class C; +class C; // ERROR - forward declaration void g(const C& c) { |