Re: [Lldb-commits] [lldb] r251107 - Disable the strict-aliasing warnings produced by gcc

2015-10-23 Thread Tamas Berghammer via lldb-commits
I agree that this isn't the perfect approach, but I don't think we want to
take the performance penalty "-fno-strict-aliasing" will cause (we are
using LLDB like this for a long time without any known issue caused by
strict aliasing violations). The best solution would be to fix the strict
aliasing violations or validate that they are actually false positives (and
work them around) but it haven't happened in the last ~1 year and I don't
expect it to happen in the near future either. My primary reason to disable
these warnings is to make the other (less noisy) gcc warnings more visible
so we can detect possible real problems from them. Having this warning
enabled at the current state have almost zero value as AFAIK nobody cares
about then and nobody would notice if a new one appear because of the
general noise level.

Tamas

On Fri, Oct 23, 2015 at 1:24 PM Joerg Sonnenberger 
wrote:

> On Fri, Oct 23, 2015 at 10:34:54AM -, Tamas Berghammer via
> lldb-commits wrote:
> > Author: tberghammer
> > Date: Fri Oct 23 05:34:53 2015
> > New Revision: 251107
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=251107&view=rev
> > Log:
> > Disable the strict-aliasing warnings produced by gcc
> >
> > GCC produce a lot of strict-aliasing warning for the LLDB codebase
> > what makes reading the compile output very difficult. This change
> > disable these warnings to reduce the noise as we already ignore them.
> >
> > We should consider re-enabling the warning if we fix all (or most)
> > strict-aliasing violation first.
>
> This feels very wrong. If you want to disable the warnings, at least
> also disable the codegen dependency with -fno-strict-aliasing.
>
> Joerg
>
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [lldb] r251107 - Disable the strict-aliasing warnings produced by gcc

2015-10-23 Thread Joerg Sonnenberger via lldb-commits
On Fri, Oct 23, 2015 at 10:34:54AM -, Tamas Berghammer via lldb-commits 
wrote:
> Author: tberghammer
> Date: Fri Oct 23 05:34:53 2015
> New Revision: 251107
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=251107&view=rev
> Log:
> Disable the strict-aliasing warnings produced by gcc
> 
> GCC produce a lot of strict-aliasing warning for the LLDB codebase
> what makes reading the compile output very difficult. This change
> disable these warnings to reduce the noise as we already ignore them.
> 
> We should consider re-enabling the warning if we fix all (or most)
> strict-aliasing violation first.

This feels very wrong. If you want to disable the warnings, at least
also disable the codegen dependency with -fno-strict-aliasing.

Joerg
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] r251107 - Disable the strict-aliasing warnings produced by gcc

2015-10-23 Thread Tamas Berghammer via lldb-commits
Author: tberghammer
Date: Fri Oct 23 05:34:53 2015
New Revision: 251107

URL: http://llvm.org/viewvc/llvm-project?rev=251107&view=rev
Log:
Disable the strict-aliasing warnings produced by gcc

GCC produce a lot of strict-aliasing warning for the LLDB codebase
what makes reading the compile output very difficult. This change
disable these warnings to reduce the noise as we already ignore them.

We should consider re-enabling the warning if we fix all (or most)
strict-aliasing violation first.

Differential revision: http://reviews.llvm.org/D13981

Modified:
lldb/trunk/cmake/modules/LLDBConfig.cmake

Modified: lldb/trunk/cmake/modules/LLDBConfig.cmake
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBConfig.cmake?rev=251107&r1=251106&r2=251107&view=diff
==
--- lldb/trunk/cmake/modules/LLDBConfig.cmake (original)
+++ lldb/trunk/cmake/modules/LLDBConfig.cmake Fri Oct 23 05:34:53 2015
@@ -210,6 +210,12 @@ if (CXX_SUPPORTS_NO_UNKNOWN_PRAGMAS)
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unknown-pragmas")
 endif ()
 
+check_cxx_compiler_flag("-Wno-strict-aliasing"
+CXX_SUPPORTS_NO_STRICT_ALIASING)
+if (CXX_SUPPORTS_NO_STRICT_ALIASING)
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-strict-aliasing")
+endif ()
+
 # Disable Clang warnings
 check_cxx_compiler_flag("-Wno-deprecated-register"
 CXX_SUPPORTS_NO_DEPRECATED_REGISTER)


___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits