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]
Other format: [Raw text]

Patch for stray "ISO C89" references


When "ISO C89" was changed to "ISO C90" in the compiler, some
references were missed.  Fixed thus.  Boostrapped with no regressions
on i686-pc-linux-gnu.  Applied to mainline and 3.4 branch.

2004-02-08  Joseph S. Myers  <jsm@polyomino.org.uk>

	* README.Portability: Change "ISO C89" to "ISO C90".
	* c-parse.in (primary, initelt): Likewise.

testsuite:
2004-02-08  Joseph S. Myers  <jsm@polyomino.org.uk>

	* gcc.dg/c90-init-1.c: Adjust expected error messages.

--- gcc/README.Portability.orig	2003-12-14 20:16:30.000000000 +0000
+++ gcc/README.Portability	2004-02-07 19:41:35.000000000 +0000
@@ -10,7 +10,7 @@
 thought I'd collect it in one useful place.  Please add and correct
 any problems as you come across them.
 
-I'm going to start from a base of the ISO C89 standard, since that is
+I'm going to start from a base of the ISO C90 standard, since that is
 probably what most people code to naturally.  Obviously using
 constructs introduced after that is not a good idea.
 
--- gcc/c-parse.in.orig	2004-02-04 20:23:14.000000000 +0000
+++ gcc/c-parse.in	2004-02-07 19:41:48.000000000 +0000
@@ -652,7 +652,7 @@ primary:
 		  finish_init ();
 
 		  if (pedantic && ! flag_isoc99)
-		    pedwarn ("ISO C89 forbids compound literals");
+		    pedwarn ("ISO C90 forbids compound literals");
 		  $$ = build_compound_literal (type, constructor);
 		}
 	| '(' expr ')'
@@ -1515,7 +1515,7 @@ initlist1:
 initelt:
 	  designator_list '=' initval
 		{ if (pedantic && ! flag_isoc99)
-		    pedwarn ("ISO C89 forbids specifying subobject to initialize"); }
+		    pedwarn ("ISO C90 forbids specifying subobject to initialize"); }
 	| designator initval
 		{ if (pedantic)
 		    pedwarn ("obsolete use of designated initializer without `='"); }
--- gcc/testsuite/gcc.dg/c90-init-1.c.orig	2001-01-12 23:18:05.000000000 +0000
+++ gcc/testsuite/gcc.dg/c90-init-1.c	2004-02-08 20:20:32.000000000 +0000
@@ -7,10 +7,10 @@
   int B;
   short C[2];
 };
-int a[10] = { 10, [4] = 15 };			/* { dg-error "ISO C89 forbids specifying subobject to initialize" } */
-struct A b = { .B = 2 };			/* { dg-error "ISO C89 forbids specifying subobject to initialize" } */
-struct A c[] = { [3].C[1] = 1 };		/* { dg-error "ISO C89 forbids specifying subobject to initialize" } */
-struct A d[] = { [4 ... 6].C[0 ... 1] = 2 };	/* { dg-error "(forbids specifying range of elements to initialize)|(ISO C89 forbids specifying subobject to initialize)" } */
+int a[10] = { 10, [4] = 15 };			/* { dg-error "ISO (C89|C90) forbids specifying subobject to initialize" } */
+struct A b = { .B = 2 };			/* { dg-error "ISO (C89|C90) forbids specifying subobject to initialize" } */
+struct A c[] = { [3].C[1] = 1 };		/* { dg-error "ISO (C89|C90) forbids specifying subobject to initialize" } */
+struct A d[] = { [4 ... 6].C[0 ... 1] = 2 };	/* { dg-error "(forbids specifying range of elements to initialize)|(ISO (C89|C90) forbids specifying subobject to initialize)" } */
 int e[] = { [2] 2 };				/* { dg-error "use of designated initializer without" } */
 struct A f = { C: { 0, 1 } };			/* { dg-error "use of designated initializer with " } */
 int g;

-- 
Joseph S. Myers
jsm@polyomino.org.uk


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