This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

C++ patch: use the term "compound literal"


GCC used to refer to compound literals as constructor expressions;
I've changed the manual to use the C99 terminology (and the C compiler
some time ago) but the C++ compiler may still use the old confusing
terminology in a pedwarn.  This patch fixes that.

Bootstrapped with no regressions on i686-pc-linux-gnu.  OK to commit
to mainline and 3.0 branch?

2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>

	* parse.y: Refer to compound literals as such, not as
	constructor-expressions.

--- parse.y.orig	Mon May 21 18:17:50 2001
+++ parse.y	Tue May 22 08:28:22 2001
@@ -1338,8 +1338,8 @@
 		  tree init = build_nt (CONSTRUCTOR, NULL_TREE,
 					nreverse ($3)); 
 		  if (pedantic)
-		    pedwarn ("ISO C++ forbids constructor-expressions");
-		  /* Indicate that this was a GNU C constructor expression.  */
+		    pedwarn ("ISO C++ forbids compound literals");
+		  /* Indicate that this was a C99 compound literal.  */
 		  TREE_HAS_CONSTRUCTOR (init) = 1;
 
 		  $$ = reparse_absdcl_as_casts ($$, init);

-- 
Joseph S. Myers
jsm28@cam.ac.uk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]