C++ and useful error messages

Robert Dewar dewar@gnat.com
Tue Dec 19 02:57:00 GMT 2000


> I predict that after the release of GCC 3.0 we will see an avalanche of
> bug reports/complaints that g++ fails for the most simple kind of input:
> 
>   #include <vector>
>   class C {
>     vector<int> vi;
>     };
> 
>   % gccvs x.cc
>   x.cc:3: syntax error before `;' token
> 
> Yes, this program is not ISO C++, but still this kind of failure mode
> is hardly acceptable, IMNSHO.

Silent backwards compatibility by default seems a bit dubious. People do
have to learn the language C++ (= at this stage ISO C++) eventually.

Is it possible to give a clearer error message that would point people
to understanding the incompatibility (the bland syntax error message
above is indeed confusing)?



More information about the Gcc mailing list