diff options
author | Guilhem Bichot <guilhem@mysql.com> | 2010-11-05 14:17:47 +0100 |
---|---|---|
committer | Guilhem Bichot <guilhem@mysql.com> | 2010-11-05 14:17:47 +0100 |
commit | f6ae96d40dc3e24c7ea0d88fa8cbfc3554449d04 (patch) | |
tree | 12842b525271084c17472484dec3f9398067ad9c /config | |
parent | 7b2e07232a9307220187ee858c7c12a0d899d593 (diff) | |
download | mariadb-git-f6ae96d40dc3e24c7ea0d88fa8cbfc3554449d04.tar.gz |
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.
Diffstat (limited to 'config')
-rw-r--r-- | config/ac-macros/maintainer.m4 | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/config/ac-macros/maintainer.m4 b/config/ac-macros/maintainer.m4 index 5960853d7f1..b4d2f08e558 100644 --- a/config/ac-macros/maintainer.m4 +++ b/config/ac-macros/maintainer.m4 @@ -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. |