diff options
| author | Mark Mitchell <mark@codesourcery.com> | 2003-03-08 18:47:42 +0000 |
|---|---|---|
| committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2003-03-08 18:47:42 +0000 |
| commit | 0e1363428da6b1ff7d0f20d730e5fd76a29241ed (patch) | |
| tree | ac2ca092904548ecb5c41cd9e875ffc991c35ea8 /gcc/cp/semantics.c | |
| parent | 988d1653869158be80b797b13a60dacfc0a4fa22 (diff) | |
| download | gcc-0e1363428da6b1ff7d0f20d730e5fd76a29241ed.zip gcc-0e1363428da6b1ff7d0f20d730e5fd76a29241ed.tar.gz gcc-0e1363428da6b1ff7d0f20d730e5fd76a29241ed.tar.bz2 | |
re PR c++/9823 (ICE in sort_mem_initializers)
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.
From-SVN: r63999
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 cf0bec7..a5b7c50 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. */ |
