enums

Ben Elliston bje@redhat.com
Wed Dec 6 03:35:00 GMT 2000


   > :    (values ("RESET") ("BUSERR" -) ("DPF" -) ("IPF" -)
   > :            ("EXTINT" -) ("ALIGN" -) ("ILLEGAL" -) ("PEINT" -)
   > :            ("DTLBMISS" -) ("ITLBMISS" -) ("RRANGE" -)
   > :            ("SYSCALL" -) ("BREAK" -) ("RESERVED" -))

   > Is this intentional?  Why define the others with value "-" ?

   Well, first i defined it like: ("RESET" #x100) ("BUFFER" #x200) And
   that didn't work at all.  All the "-" values is just the result of a
   search-and-replace.

In other contexts, an enum value can be:

	(values "RESET" "BUSERR" "DPF" ..)

Does that work?

Ben



More information about the Cgen mailing list