On Tue, Apr 06, 2010 at 09:00:16AM -0700, Chris Lattner wrote:
> I wrote a little blog post that shows off some of the things that Clang can 
> do.  It would be great to improve some of GCC/G++'s diagnostics in a similar 
> way:
> 
> http://blog.llvm.org/2010/04/amazing-feats-of-clang-error-recovery.html

Some of Chris's examples appear to be regressions, in that gcc's old
bison-based parser did a better job than the current parser.  In
particular, around the time of the 2->3 transition, a rule was added to
catch the fact that

foo bar;

where neither is defined as a type, almost certainly is because of a
missing definition of the type foo, or a mis-spelling (this is what is
going on in several of Chris's examples).  I pushed to get that rule
added because I tried a lot of "C++" code that had only been compiled
with g++ 2.9x, and it was filled with uses of STL without std:: because
back then, the standard library wasn't in a namespace and std:: was
magic that was ignored.




Reply via email to