On 6 April 2010 18:00, Chris Lattner <clatt...@apple.com> wrote: > > On Apr 5, 2010, at 8:20 AM, Benjamin Kosnik wrote: > >> >> Hello all! >> >> I've put up a short diagnostics comparison between gcc, icc, and >> clang. It is my plan to update this with major revisions to individual >> compilers. >> >> Included are most of the outstanding bugzilla requests with the >> "diagnostic" keyword. However, I am looking for help! Please send me >> code samples that frustrate, obfuscate, and annoy. >> >> In particular, I am looking for template instantiation issues such as >> c++/41884, but hopefully something in a deliciously small snippet. No >> doubt other C++ hackers have particular annoyances. >> > > Hi Benjamin, > > 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
Unfortunately, you mix C and C++ examples. I know it is because clang parses both with the same parser but this thread is only discussing improving C++ diagnostics in GCC, and there is no plan or project for C diagnostics. As it happens, some C++ diagnostics are better than the same diagnostic for C and viceversa. I love the merge conflict detector, btw. :-) If I am allowed, I would like to implement that one in C/C++ parsers. Joseph? Jason? Cheers, Manuel.