This is the mail archive of the
cgen@sources.redhat.com
mailing list for the CGEN project.
enums
- To: cgen at sources dot redhat dot com
- Subject: enums
- From: Johan Rydberg <johan dot rydberg at netinsight dot se>
- Date: Wed, 06 Dec 2000 09:31:09 +0100
- Organization: Net Insight AB
Hi!
I define an enum like this:
(define-enum
(name e-exception)
(comment "exception vectors")
()
(prefix E_)
(values ("RESET") ("BUSERR" -) ("DPF" -) ("IPF" -)
("EXTINT" -) ("ALIGN" -) ("ILLEGAL" -) ("PEINT" -)
("DTLBMISS" -) ("ITLBMISS" -) ("RRANGE" -)
("SYSCALL" -) ("BREAK" -) ("RESERVED" -))
)
And the result in the "desc.h" file:
/* Enum declaration for exception vectors. */
typedef enum e_exception {
E_RESET
} E_EXCEPTION;
As you can tell, all enums but the first one is left out.
And if I define the values like this,
(values ("RESET" #x100) ("BUSERR" -) ("DPF" -) ("IPF" -)
("EXTINT" -) ("ALIGN" -) ("ILLEGAL" -) ("PEINT" -)
("DTLBMISS" -) ("ITLBMISS" -) ("RRANGE" -)
("SYSCALL" -) ("BREAK" -) ("RESERVED" -))
I get the following message for CGEN:
ERROR: In procedure caar:
ERROR: Wrong type argument in position 1: ()
Have I missed something as usual?
--
Johan Rydberg, Net Insight AB, Sweden, +46-8-685 04 00
$ ON F$ERROR("LANGUAGE","ENGLISH","IN_MESSAGE").GT.F$ERROR("NORMAL") -
THEN EXCUSE/OBJECT=ME