c++/9621: const int typedef is rejected
Gabriel Dos Reis
gdr@integrable-solutions.net
Sat Feb 8 04:06:00 GMT 2003
Wolfgang Bangerth <bangerth@ticam.utexas.edu> writes:
| > > 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++.
*No*. GCC is correct in accepting it. That is what C and C++
standards require.
| I'll change the synopsis of the report in a minute. Thanks for your
| clarification.
Please, don't do that! Is it an error not to accept
int const typede T;
It is an error to reject
int typedef T;
-- Gaby
More information about the Gcc-bugs
mailing list