Juha Nieminen <nos...@thanks.invalid> wrote:
> This piece of code, by itself, does not cause a compiler error with gcc6,
> but does with clang:
>
> //-------------------------------------------
> template<typename T>
> class C
> {
> public:
> test(int, int);
> };
> //-------------------------------------------
>
> clang says:
> error: C++ requires a type specifier for all declarations
>
> gcc says nothing and just accepts it. I wonder what it's thinking.
Did something change? The ancient 4.8.4 I have to use says this:
error: ISO C++ forbids declaration of 'test' with no type [-fpermissive]
which looks useful enough to me.