[Prev][Next][Index]
Problems with enums
- Subject: Problems with enums
- From: Diego Novillo <diego@cs.ualberta.ca>
- To: sage-bugs@cica.indiana.edu (Sage Bug Reports)
- Date: Wed, 22 Feb 1995 12:48:57 -0700 (MST)
- Sender: owner-sage-bugs@extreme.indiana.edu
Hi,
I realize that this is not a Sage bug. Our restructuring tool works with
ansi C and we are having problems with enums. If the user has the
following declaration:
typedef enum { a=1, b } myEnum;
It is unparsed to:
enum { a=1, b } myEnum;
That is, the 'typedef' keyword is dropped and that confuses the ansi C
compiler. We also tried to do:
enum xxx { a=1, b };
typedef enum xxx myEnum;
But it didn't work either. Is there a way to patch the unparser to keep
the 'typedef' keyword when unparsing enums? Thank you.
Diego.
--
Diego Novillo (diego@cs.ualberta.ca) | Dept of Computing Science
WWW http://web.cs.ualberta.ca/~diego | University of Alberta
Use 'finger' to get my PGP public key | Edmonton, Alberta - Canada