Browse Source

Unify -Wno arguments generation
commit_hash:33157feb41c65ab08e797adea3b0be5ed6e5bc3f

thegeorg 3 months ago
parent
commit
284518c9e8
1 changed files with 7 additions and 10 deletions
  1. 7 10
      build/ymake_conf.py

+ 7 - 10
build/ymake_conf.py

@@ -1468,15 +1468,7 @@ class GnuCompiler(Compiler):
             '-Wall',
             '-Wextra',
         ]
-        self.cxx_warnings = [
-            # Issue a warning if certain overload is hidden due to inheritance
-            '-Woverloaded-virtual',
-        ]
-
-        # Disable some warnings which will fail compilation at the time
-        self.c_warnings += [
-            '-Wno-parentheses',
-        ]
+        self.cxx_warnings = []
 
         self.c_defines = ['${hide:CPP_FAKEID}']
         if self.target.is_android:
@@ -1537,13 +1529,16 @@ class GnuCompiler(Compiler):
             self.sfdl_flags.append('-Qunused-arguments')
 
             self.c_warnings += [
+                '-Wno-parentheses',
                 '-Wno-implicit-const-int-float-conversion',
-                # For nvcc to accept the above.
+                # For nvcc to accept the above
                 '-Wno-unknown-warning-option',
             ]
 
             self.cxx_warnings += [
                 '-Wimport-preprocessor-directive-pedantic',
+                # Issue a warning if certain overload is hidden due to inheritance
+                '-Woverloaded-virtual',
                 '-Wno-ambiguous-reversed-operator',
                 '-Wno-defaulted-function-deleted',
                 '-Wno-deprecated-anon-enum-enum-conversion',
@@ -2083,11 +2078,13 @@ class MSVCCompiler(MSVC, Compiler):
 
             c_warnings += [
                 '-Wno-parentheses',
+                # For nvcc to accept the above
                 '-Wno-unknown-warning-option',
             ]
 
             cxx_warnings += [
                 '-Wimport-preprocessor-directive-pedantic',
+                # Issue a warning if certain overload is hidden due to inheritance
                 '-Woverloaded-virtual',
                 '-Wno-ambiguous-reversed-operator',
                 '-Wno-defaulted-function-deleted',