Changes between Version 25 and Version 26 of Guidelines/WarningsGuidelines


Ignore:
Timestamp:
Dec 4, 2012, 3:24:34 PM (10 years ago)
Author:
Paul A. Bristow
Comment:

Added some info on Clang compiler - more needed

Legend:

Unmodified
Added
Removed
Modified
  • Guidelines/WarningsGuidelines

    v25 v26  
    855855
    856856----
     857
     858'''Clang'''
     859
     860Clang supports most GCC warnings, see [http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html]
     861
     862[http://clang.llvm.org/docs/UsersManual.html#cl_diagnostics]
     863
     864Clang also supports suppressing warnings by pragmas, see [http://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html]
     865for example
     866
     867{{{#pragma clang diagnostic ignored "-Wno-unused-variable"}}}
     868
     869As with MSVC, it is usually desirable to localize warning suppression by bracketing push'n'pop pragmas.
     870Localization is especially important in included .hpp library files to avoid quietly suppressing warnings in user code:
     871the user may need to see warnings in his code.  A contrived example is:
     872
     873{{{
     874#pragma clang diagnostic push
     875#pragma clang diagnostic ignored "-Wmultichar"
     876
     877char b = 'df'; // No warning.
     878
     879#pragma clang diagnostic pop
     880}}}
     881
     882More info needed on Clang.
     883
    857884'''Intel'''
    858885