C++, libstdc++-v3 and, well, error messages
Gabriel Dos_Reis
Gabriel.Dos_Reis@sophia.inria.fr
Sat Nov 18 04:39:00 GMT 2000
Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> writes:
| If you compile the following trivial snippet
|
| #include <vector>
| vector<int> v;
|
| with our current CVS sources, you'll get the following error:
|
| filename:2: syntax error before ';' token
|
| Now, I know what's wrong in that snippet, but how many of our users will
| spend a lot of time tracking this down and also submit bug reports?
|
| Perhaps we could issue a better diagnostic message?
Certainly, but that would involve contrived parser hackery which I'm
not sure we have time to invest in. CodeSourcery announced that it
will turn the C++ parser in a recursive descent one -- which
undoubtely will allow better error diagnostics and error recovery.
Furthermore, the Subject: field seems to imply that the problem you
are reporting is related to libstdc++-v3. The problem has nothing to
do with V3, it is entirely front-end specific as exemplified by this:
%merlin% cat 3.C
mystack<int> v;
merlin% g++ -c 3.C
3.C:1: syntax error before ';' token
But, I agree with you that the diagnostic message could (or has to) be
improved.
-- Gaby
More information about the Gcc
mailing list