This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH: Improved parser diagnosis
- To: pfeifer at dbai dot tuwien dot ac dot at (Gerald Pfeifer)
- Subject: Re: C++ PATCH: Improved parser diagnosis
- From: Joe Buck <jbuck at racerx dot synopsys dot com>
- Date: Wed, 21 Mar 2001 10:57:43 -0800 (PST)
- Cc: gcc-patches at gcc dot gnu dot org, gdr at codesourcery dot com (Gabriel Dos Reis), aoliva at redhat dot com (Alexandre Oliva)
> > #include <vector>
> >
> > vector<int> foo;
> >
> > that would suddenly get syntax errors pointing to the semicolon. Even
> > if we now say "type" where we should say "template", we will be giving
> > users enough info to fix the problem, which is the most important thing.
>
> Exactly! (Nearly) anything is better than just the "syntax error" we used
> to get.
I had something further in mind: when this error occurs, we look to see
if the symbol exists in the std namespace, and add the message
Perhaps you meant to use std::vector?
if the symbol is found there.