This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Accept whitespace in define_attr/set_attr lists
- From: Zack Weinberg <zack at codesourcery dot com>
- To: John David Anglin <dave at hiauly1 dot hia dot nrc dot ca>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 13 May 2002 15:16:12 -0700
- Subject: Re: Accept whitespace in define_attr/set_attr lists
- References: <200205132203.g4DM3aEM000355@hiauly1.hia.nrc.ca>
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);