c++/9621: const int typedef is rejected
Wolfgang Bangerth
bangerth@ticam.utexas.edu
Sat Feb 8 00:46:00 GMT 2003
> > 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/
More information about the Gcc-bugs
mailing list