diff options
author | Joseph Myers <jsm28@cam.ac.uk> | 2001-12-17 01:18:41 +0000 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2001-12-17 01:18:41 +0000 |
commit | 8d37a5c0db11afb1c4b6d578ad46d1dfb1213118 (patch) | |
tree | b0c444fe54bd3f1b332cc67c0727beaa08189268 /gcc/c-common.def | |
parent | cf6ede82ac9bf9fdd08be25e806e131ac9a8f47e (diff) | |
download | gcc-8d37a5c0db11afb1c4b6d578ad46d1dfb1213118.zip gcc-8d37a5c0db11afb1c4b6d578ad46d1dfb1213118.tar.gz gcc-8d37a5c0db11afb1c4b6d578ad46d1dfb1213118.tar.bz2 |
re PR c/5105 (compound literal patch broken with inlining)
* c-common.def (COMPOUND_LITERAL_EXPR): Contain a DECL_STMT, not
a DECL directly.
* c-common.h (COMPOUND_LITERAL_EXPR_DECL_STMT): New.
(COMPOUND_LITERAL_EXPR_DECL): Adjust definition.
* c-decl.c (build_compound_literal): Put the decl inside a
DECL_STMT.
* doc/c-tree.texi (COMPOUND_LITERAL_EXPR): Update documentation.
Fixes PR c/5105.
testsuite:
* gcc.c-torture/compile/20011217-1.c: New test.
From-SVN: r48085
Diffstat (limited to 'gcc/c-common.def')
-rw-r--r-- | gcc/c-common.def | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/c-common.def b/gcc/c-common.def index 7840ce8..d9b14be 100644 --- a/gcc/c-common.def +++ b/gcc/c-common.def @@ -103,7 +103,8 @@ DEFTREECODE (CASE_LABEL, "case_label", 'e', 3) DEFTREECODE (STMT_EXPR, "stmt_expr", 'e', 1) /* A COMPOUND_LITERAL_EXPR represents a C99 compound literal. The - COMPOND_LITERAL_EXPR_DECL is the decl for the anonymous object - represented by the COMPOUND_LITERAL; the DECL_INITIAL of that - decl is the CONSTRUCTOR that initializes the compound literal. */ + COMPOND_LITERAL_EXPR_DECL_STMT is the a DECL_STMT containing the decl + for the anonymous object represented by the COMPOUND_LITERAL; + the DECL_INITIAL of that decl is the CONSTRUCTOR that initializes + the compound literal. */ DEFTREECODE (COMPOUND_LITERAL_EXPR, "compound_literal_expr", 'e', 1) |