changeset 362875aec1ba in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=362875aec1ba
description:
        scons: Silence clang 3.4 warnings on Ubuntu 12.04

        This changeset fixes three types of warnings that occur in clang 3.4
        on Ubuntu 12.04:

         * Certain versions of libstdc++ (primarily 4.8) use struct and class
           interchangeably. This triggers a warning in clang.

         * Swig has a tendency to generate code with the register class which
           was deprecated in C++11. This triggers a deprecation warning in
           clang.

         * Swig sometimes generates Python wrapper code which returns
           uninitialized values. It's unclear if this is actually a problem
           (the cases might be limited to failure paths). We'll silence these
           warnings for now since there is little we can do about the
           generated code.

diffstat:

 SConstruct     |  7 ++++++-
 src/SConscript |  8 ++++++++
 2 files changed, 14 insertions(+), 1 deletions(-)

diffs (35 lines):

diff -r ef888b246cd0 -r 362875aec1ba SConstruct
--- a/SConstruct        Wed Aug 13 06:57:27 2014 -0400
+++ b/SConstruct        Wed Aug 13 06:57:28 2014 -0400
@@ -638,7 +638,12 @@
     # is relying on this
     main.Append(CCFLAGS=['-Wno-tautological-compare',
                          '-Wno-parentheses',
-                         '-Wno-self-assign'])
+                         '-Wno-self-assign',
+                         # Some versions of libstdc++ (4.8?) seem to
+                         # use struct hash and class hash
+                         # interchangeably.
+                         '-Wno-mismatched-tags',
+                         ])
 
     main.Append(TCMALLOC_CCFLAGS=['-fno-builtin'])
 
diff -r ef888b246cd0 -r 362875aec1ba src/SConscript
--- a/src/SConscript    Wed Aug 13 06:57:27 2014 -0400
+++ b/src/SConscript    Wed Aug 13 06:57:28 2014 -0400
@@ -940,6 +940,14 @@
         # with non-virtual destructors
         new_env.Append(CXXFLAGS=['-Wdelete-non-virtual-dtor'])
 
+        swig_env.Append(CCFLAGS=[
+                # Some versions of SWIG can return uninitialized values
+                '-Wno-sometimes-uninitialized',
+                # Register storage is requested in a lot of places in
+                # SWIG-generated code.
+                '-Wno-deprecated-register',
+                ])
+
     werror_env = new_env.Clone()
     werror_env.Append(CCFLAGS='-Werror')
 
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to