diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-03-08 18:47:42 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-03-08 18:47:42 +0000 |
commit | 7e5ca199b12f5acb3ec389c2dd143590bb09fbea (patch) | |
tree | ac2ca092904548ecb5c41cd9e875ffc991c35ea8 /gcc/cp/semantics.c | |
parent | 639e4be490c1f985b7ec590c34a03a0870141c36 (diff) | |
download | gcc-7e5ca199b12f5acb3ec389c2dd143590bb09fbea.tar.gz |
PR c++/9823
* cp-tree.h (begin_mem_initializers): Remove.
* parser.c (cp_parser_mem_initializer_list): Inline it here.
Do not call finish_mem_initializers if not in a constructor.
(cp_parser_class_head): Fix typo in error message.
* semantics.c (begin_mem_initializers): Remove.
* testsuite/g++.dg/parser/constructor1.C: New test.
PR c++/9823
* g++.dg/parser/constructor1.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63999 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r-- | gcc/cp/semantics.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index cf0bec7249b..a5b7c503980 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -1142,15 +1142,6 @@ finish_eh_cleanup (cleanup) add_stmt (r); } -/* Begin processing a mem-initializer-list. */ - -void -begin_mem_initializers () -{ - if (! DECL_CONSTRUCTOR_P (current_function_decl)) - error ("only constructors take base initializers"); -} - /* The MEM_INITS is a list of mem-initializers, in reverse of the order they were written by the user. Each node is as for emit_mem_initializers. */ |