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]

Re: Accept whitespace in define_attr/set_attr lists


On Mon, May 13, 2002 at 06:03:35PM -0400, John David Anglin wrote:
> I am seeing warnings like:
> 
> insn-attr.h:10: warning: comma at end of enumerator list
> insn-attr.h:14: warning: comma at end of enumerator list
> insn-attr.h:18: warning: comma at end of enumerator list
> insn-attr.h:31: warning: comma at end of enumerator list
> insn-attr.h:35: warning: comma at end of enumerator list
> insn-attr.h:39: warning: comma at end of enumerator list

Blargh, yes, that's my fault.  Please try this patch.

zw

	* genattr.c (gen_attr): Don't emit a comma after the last
	enumerator.

===================================================================
Index: genattr.c
--- genattr.c	12 May 2002 18:43:33 -0000	1.50
+++ genattr.c	13 May 2002 22:15:37 -0000
@@ -106,7 +106,8 @@ gen_attr (attr)
 	  putchar ('_');
 	  while (tag != p)
 	    putchar (TOUPPER (*tag++));
-	  fputs (", ", stdout);
+	  if (*p == ',')
+	    fputs (", ", stdout);
 	}
 
       fputs ("};\n", stdout);


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