[dia] [warnigectomy] Use -Werror=... rather than --std=c89



commit 65b4ff6191f210201acfe11f8f969e4d910b1928
Author: Hans Breuer <hans breuer org>
Date:   Sun Jan 26 14:33:06 2014 +0100

    [warnigectomy] Use -Werror=... rather than --std=c89
    
    On win32 we still need c89/c90 w/o gnu extension due to msvc6 use.
    But --std=c89 is very strict, e.g. it prohibits single line
    comments.
    The following -Werror= reject constructs which break the Windows
    build
    
     -Werror=declaration-after-statement
     -Werror=implicit-function-declaration
    
    There might be more conmstructs to avoid, but these arte the most
    pressing. Actually the second is turned into an error explicetly
    on Windows, too. But the first one is a compiler limitation.

 configure.in |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/configure.in b/configure.in
index eec699f..bfca467 100644
--- a/configure.in
+++ b/configure.in
@@ -503,10 +503,13 @@ if test "$GCC" = yes; then
 
   DIA_CHECK_CFLAG(-Wall)
   dnl DIA_CHECK_CFLAG(-Wunused)
-  DIA_CHECK_CFLAG(--std=c89)
-  DIA_CHECK_CFLAG(-Wdeclaration-after-statement)
+  dnl On win32 we still need c89/c90 w/o gnu extension due to msvc6 use.
+  dnl But --std=c89 is very strict, e.g. it prohibits single line comments.
+  dnl The following -Werror= reject constructs which break the Windows build
+  dnl DIA_CHECK_CFLAG(--std=c89)
+  DIA_CHECK_CFLAG(-Werror=declaration-after-statement)
   dnl I'd rather like to enable this but it fails on isnan() with -std=c89
-  dnl DIA_CHECK_CFLAG(-Werror-implicit-function-declaration)
+  DIA_CHECK_CFLAG(-Werror=implicit-function-declaration)
   dnl Premature optimization is the root of all evil.  Uncomment this if
   dnl you want ti figure out functions that should have been inlined but aint.
   dnl DIA_CHECK_CFLAG(-Winline)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]