List:Commits« Previous MessageNext Message »
From:Guilhem Bichot Date:November 5 2010 1:17pm
Subject:bzr commit into mysql-5.1-bugteam branch (guilhem:3553) Bug#57933
View as plain text  
#At file:///home/mysql_src/bzrrepos_new/mysql-5.1-bugteam/ based on revid:georgi.kodinov@stripped

 3553 Guilhem Bichot	2010-11-05
      BUG#57933 "add -Wdeclaration-after-statement to gcc builds";
      first part, for autotools build.
     @ config/ac-macros/maintainer.m4
        Add the flag. With it, and as we use -Werror, we nicely get
        "error: ISO C90 forbids mixed declarations and code" if
        a declaration follows a statement in C code.
        Note that g++ refuses this flag.

    modified:
      config/ac-macros/maintainer.m4
=== modified file 'config/ac-macros/maintainer.m4'
--- a/config/ac-macros/maintainer.m4	2010-10-18 16:27:10 +0000
+++ b/config/ac-macros/maintainer.m4	2010-11-05 13:17:47 +0000
@@ -19,6 +19,7 @@ AC_DEFUN([MY_MAINTAINER_MODE_WARNINGS], 
   AS_IF([test "$GCC" = "yes"], [
     C_WARNINGS="-Wall -Wextra -Wunused -Wwrite-strings -Wno-strict-aliasing -Werror"
     CXX_WARNINGS="${C_WARNINGS} -Wno-unused-parameter"
+    C_WARNINGS="${C_WARNINGS} -Wdeclaration-after-statement"
   ])
 
   # Test whether the warning options work.


Attachment: [text/bzr-bundle] bzr/guilhem@mysql.com-20101105131747-qh7boorqpe3z3cl2.bundle
Thread
bzr commit into mysql-5.1-bugteam branch (guilhem:3553) Bug#57933Guilhem Bichot5 Nov