Commit 36e6fa69 by Richard Stallman

(c_decode_option): Handle -Wmissing-braces.

From-SVN: r3471
parent 815a862a
...@@ -497,6 +497,10 @@ int warn_conversion; ...@@ -497,6 +497,10 @@ int warn_conversion;
int warn_parentheses; int warn_parentheses;
/* Warn if initializer is not completely bracketed. */
int warn_missing_braces;
/* Nonzero means `$' can be in an identifier. /* Nonzero means `$' can be in an identifier.
See cccp.c for reasons why this breaks some obscure ANSI C programs. */ See cccp.c for reasons why this breaks some obscure ANSI C programs. */
...@@ -645,6 +649,10 @@ c_decode_option (p) ...@@ -645,6 +649,10 @@ c_decode_option (p)
; /* cpp handles this one. */ ; /* cpp handles this one. */
else if (!strcmp (p, "-Wno-import")) else if (!strcmp (p, "-Wno-import"))
; /* cpp handles this one. */ ; /* cpp handles this one. */
else if (!strcmp (p, "-Wmissing-braces"))
warn_missing_braces = 1;
else if (!strcmp (p, "-Wno-missing-braces"))
warn_missing_braces = 0;
else if (!strcmp (p, "-Wall")) else if (!strcmp (p, "-Wall"))
{ {
extra_warnings = 1; extra_warnings = 1;
...@@ -660,6 +668,7 @@ c_decode_option (p) ...@@ -660,6 +668,7 @@ c_decode_option (p)
warn_format = 1; warn_format = 1;
warn_char_subscripts = 1; warn_char_subscripts = 1;
warn_parentheses = 1; warn_parentheses = 1;
warn_missing_braces = 1;
} }
else else
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment