aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppfiles.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2003-08-01 09:34:09 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2003-08-01 09:34:09 +0000
commita5bcc58230c173c6923908cd7622dca7240f18de (patch)
treebbb501c90255aea4dd7368daf077d8f0d4280c1c /gcc/cppfiles.c
parentd340e53fc39cdfc88b89ec4a420719dc31aadca8 (diff)
downloadgcc-a5bcc58230c173c6923908cd7622dca7240f18de.zip
gcc-a5bcc58230c173c6923908cd7622dca7240f18de.tar.gz
gcc-a5bcc58230c173c6923908cd7622dca7240f18de.tar.bz2
re PR c++/11295 (ICE when using a non-trivial object in a compound statement expression)
PR c++/11295 * doc/extend.texi (Statement Expressions): Document C++ semantics. cp: PR c++/11295 * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd, tf_stmt_expr_body. (finish_stmt_expr_expr): Declare. * parser.c (cp_parser_primary_expression): Tell cp_parser_compount_statement that it is a statement expression. (cp_parser_statement, cp_parser_labeled_statement, cp_parser_compound_statement, cp_parser_statement_seq_opt): Add in_statement_expr_p parameter. (cp_parser_expression_statement): Likewise. Call finish_stmt_expr_expr for final expression of a statement expression. (cp_parser_for_init_statement, cp_parser_implicitly_scoped_statement, cp_parser_already_scoped_statement, cp_parser_function_definition, cp_parser_try_block, cp_parser_handled): Adjust. * pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr. (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags. (tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag. * semantics.c (finish_expr_stmt): Do not deal with statement expressions. (begin_stmt_expr): Clear last_expr_type. (finish_stmt_expr_expr): New. (finish_stmt_expr): Process the value expression. testsuite: PR c++/11295 * g++.dg/ext/stmtexpr1.C: New test. From-SVN: r70043
Diffstat (limited to 'gcc/cppfiles.c')
0 files changed, 0 insertions, 0 deletions