This is the mail archive of the
mailing list for the GCC project.
Re: C++, libstdc++-v3 and, well, error messages
- To: Gerald Pfeifer <pfeifer at dbai dot tuwien dot ac dot at>
- Subject: Re: C++, libstdc++-v3 and, well, error messages
- From: Gabriel Dos_Reis <Gabriel dot Dos_Reis at sophia dot inria dot fr>
- Date: 18 Nov 2000 13:39:18 +0100
- Cc: <gcc at gcc dot gnu dot org>
- Organization: I.N.R.I.A Sophia-Antipolis (France)
- References: <Pine.BSF.firstname.lastname@example.org>
Gerald Pfeifer <email@example.com> 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
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