This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/4707] g++ complains about a "typedef", but no typedefs are there


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4707


bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


------- Additional Comments From bangerth at dealii dot org  2003-08-25 15:28 -------
I think the messages are about the best the compiler can do. To explain where they 
come from, remember that a typedef can not only have the form 
  typedef int INT; 
but also this abomination: 
  int typedef INT; 
Now, with a structure, this is legal: 
  struct A { int i; } typedef INT; 
 
The problem comes here: in the reduced testcase, we have a template, not a structure, 
which cannot be typedef'd. Furthernore, since the compiler sees the infix-form of the 
typedef (rather than the usual prefix form), the only thing that can come after the "typedef" 
can be a single name, so that's where the "extraneous `int' ignored" comes from. 
 
Given this strange form of the typedef declaration, I think the compiler can do not better 
than what it is presently giving, so I close the report. 
 
W.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]