Topic: typedef of unnamed enum legal?


Author: qbarnes@erie.urbana.mcd.mot.com (Quentin Barnes)
Date: 1997/04/11
Raw View
Is the use of typedef legal with an unnamed enum?  For example:

 typedef enum { a };

I spent some time poring over sections 7, 7.1, 7.1.3, and 7.2 and
couldn't make a determination one way or the other.

According to section 7 paragraph 3, it is a legal enum since it
introduces a name (i.e. "a").  Also in the same paragraph, it would
seem the grammar of the example typedef would be allowed.  In
7.1.3., it says that a typedef introduces a synonym, but it doesn't
say that it must introduce a synonym.  It seems that the example
would be legal, but a no-op.  Is this right, or am I not reading
something correctly?


If you post a follow-up, please cc: me.  My news feed has been
very slow if at all lately.


--
Quentin Barnes       qbarnes@urbana.mcd.mot.com  Speaking for myself.
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu
]