[Git][NTPsec/ntpsec][master] 2 commits: waf: improve test for unsupported CC flags.

Gary E. Miller gitlab at mg.gitlab.com
Mon May 8 20:08:47 UTC 2017


Gary E. Miller pushed to branch master at NTPsec / ntpsec


Commits:
ee3bcbf3 by Gary E. Miller at 2017-05-08T13:04:59-07:00
waf: improve test for unsupported CC flags.

- - - - -
eeda59af by Gary E. Miller at 2017-05-08T13:08:08-07:00
waf: Add conditional -Wimplicit-fallthrough to --enable-debug-warnings.

- - - - -


1 changed file:

- wscript


Changes:

=====================================
wscript
=====================================
--- a/wscript
+++ b/wscript
@@ -61,7 +61,8 @@ def configure(ctx):
                 self.logger.debug('WafError')
                 return e.returncode
             if (len(out) and any(word in out for word
-                                 in ['err', 'ignored', 'illegal', 'unknown',
+                                 in ['err', 'err:', 'error', 'error:',
+                                     'ignored', 'illegal', 'unknown',
                                      'unrecognized', 'warning'])):
                 self.logger.debug('noooo %r' % out)
                 return 1
@@ -364,6 +365,7 @@ def configure(ctx):
             "-Wswitch-default",       # warns on Bison bug
         ] + ctx.env.CFLAGS
         cc_test_flags += [
+            ('w_implicit_fallthru', "-Wimplicit-fallthrough=3"),
             # fails on Solaris and OpenBSD 6
             # complains about a Bison bug
             ('w_sign_conversion', "-Wsign-conversion"),
@@ -435,6 +437,8 @@ int main(int argc, char **argv) {
         ctx.env.CFLAGS = ["-flto"] + ctx.env.CFLAGS
 
     # debug warnings that are not available with all compilers
+    if ctx.env.HAS_w_implicit_fallthru:
+        ctx.env.CFLAGS = ['-Wimplicit-fallthrough=3'] + ctx.env.CFLAGS
     if ctx.env.HAS_w_suggest_attribute_const:
         ctx.env.CFLAGS = ['-Wsuggest-attribute=const'] + ctx.env.CFLAGS
     if ctx.env.HAS_w_suggest_attribute_noreturn:



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/065c3741d702744449c869a40e0ea49676d93071...eeda59af7b86090497868ec8d0ff6730033b391f

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/065c3741d702744449c869a40e0ea49676d93071...eeda59af7b86090497868ec8d0ff6730033b391f
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170508/4ea7ecbf/attachment.html>


More information about the vc mailing list