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.
> 
> I'm also looking for guidance on how to rank the priority of these
> issues. Is there some way to tell what the biggest annoyance is?
> 
> http://people.redhat.com/bkoz/diagnostics/diagnostics.html

This is a great resource Benjamin, thanks for putting it together!

Some random thoughts if you ever regenerate this:

1) the caret diagnostics would be easier to understand in the output if 
formatted with a <pre> or <tt> tag.  

2) The clang invocations don't need -fcaret-diagnostics -fshow-source-location 
-fdiagnostics-fixit-info because they are the default.

3) It's best to not pass -fdiagnostics-print-source-range-info unless you're 
looking for machine interpretable output.  This flag adds things like 
{3:29-3:32} which are useful to a machine, but otherwise just clutter the 
output up.

4) It looks like ICC defaults to a number of coding standards types of checks, 
e.g. "access control not specified".  I don't know if it is possible to turn 
those off, but they seem to just be noise for the purposes of this comparison.

5) There are a couple cases of GCC rejecting valid code (e.g. 19377), or which 
there may be some debate about (19538) it might be worth pointing this out. 
*shrug*

6) My understanding was that GCC's complex extension in C++ mode is supposed to 
work like C99 _Complex. If so, 41895 looks like a GCC bug.  I don't know if 
C++'0x affects this though.

7) There are some clang bugs here.  Access control is not yet enabled by 
default (affects 20397, 39728), and a variety of other bugs (affects 14283, 
38612).  I file Clang PR#6782/6783 to track these.

Thanks again for putting this together,

-Chris


Reply via email to