aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorJoseph Myers <jsm28@cam.ac.uk>2001-12-17 01:18:41 +0000
committerJoseph Myers <jsm28@gcc.gnu.org>2001-12-17 01:18:41 +0000
commit8d37a5c0db11afb1c4b6d578ad46d1dfb1213118 (patch)
treeb0c444fe54bd3f1b332cc67c0727beaa08189268 /gcc/doc
parentcf6ede82ac9bf9fdd08be25e806e131ac9a8f47e (diff)
downloadgcc-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/doc')
-rw-r--r--gcc/doc/c-tree.texi7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/doc/c-tree.texi b/gcc/doc/c-tree.texi
index 4046d18..8d22647 100644
--- a/gcc/doc/c-tree.texi
+++ b/gcc/doc/c-tree.texi
@@ -2219,13 +2219,16 @@ Conceptually, before any initialization is done, the entire area of
storage is initialized to zero.
@item COMPOUND_LITERAL_EXPR
+@findex COMPOUND_LITERAL_EXPR_DECL_STMT
@findex COMPOUND_LITERAL_EXPR_DECL
These nodes represent ISO C99 compound literals. The
-@code{COMPOUND_LITERAL_EXPR_DECL} is an anonymous @code{VAR_DECL} for
+@code{COMPOUND_LITERAL_EXPR_DECL_STMT} is a @code{DECL_STMT}
+containing an anonymous @code{VAR_DECL} for
the unnamed object represented by the compound literal; the
@code{DECL_INITIAL} of that @code{VAR_DECL} is a @code{CONSTRUCTOR}
representing the brace-enclosed list of initializers in the compound
-literal.
+literal. That anonymous @code{VAR_DECL} can also be accessed directly
+by the @code{COMPOUND_LITERAL_EXPR_DECL} macro.
@item SAVE_EXPR