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]

Re: c++/9621: const int typedef is rejected


> >     Can some language lawyer comment on whether and why
> >       type1 typedef type2;
> >     is legal syntax?
> 
> No, it isn't. typedef is a decl-specifier. They are only allowed as a
> sequence at the start of a simple-declaration:

So it's a bug that gcc accepts it in C++. In a strange sense, it's then 
even a regression that it previously only accepted the version without 
"const" and now accepts both with and without const :-)

I'll change the synopsis of the report in a minute. Thanks for your 
clarification.

W.

-------------------------------------------------------------------------
Wolfgang Bangerth             email:            bangerth@ticam.utexas.edu
                              www: http://www.ticam.utexas.edu/~bangerth/



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