This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: C++ PATCH: Improved parser diagnosis


> > #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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]