From mboxrd@z Thu Jan 1 00:00:00 1970 From: Doug Evans To: Johan Rydberg Cc: "Frank Ch. Eigler" , cgen@sources.redhat.com Subject: Re: enums Date: Wed, 06 Dec 2000 09:28:00 -0000 Message-id: <14894.30501.274454.390529@casey.transmeta.com> References: <3A2DF94D.908E4C45@netinsight.se> <20001206061648.A1107@redhat.com> <3A2E21F0.A5A0C5FE@netinsight.se> <14894.28509.515261.442423@casey.transmeta.com> <3A2E820B.F0173EC7@netinsight.se> X-SW-Source: 2000-q4/msg00243.html Johan Rydberg writes: > Doug Evans wrote: > > > Take the line with () out. > > Well, it "works" (cgen doesn't complain that is) now. But the > result int the "desc.h" file is still the same. Righto. One more (define-enum (name e-exception) (comment "exception vectors") - () (prefix E_) - (values ("RESET") ("BUSERR" -) ("DPF" -) ("IPF" -) + (values (("RESET") ("BUSERR" -) ("DPF" -) ("IPF" -) ("EXTINT" -) ("ALIGN" -) ("ILLEGAL" -) ("PEINT" -) ("DTLBMISS" -) ("ITLBMISS" -) ("RRANGE" -) - ("SYSCALL" -) ("BREAK" -) ("RESERVED" -)) + ("SYSCALL" -) ("BREAK" -) ("RESERVED" -)) ) ) I think I chose to require the extra parens in case I wanted to add a new parameter. If y'all can't imagine anything being added we can change things - without the parens is simpler. [One can certainly argue cgen should prohibit extra args to avoid breaking a port in the future if it should happen to have junk there - the extra args are silently ignored now. This gets back to being more robust with bad input.]