Skip to content
Snippets Groups Projects
  • Marek Polacek's avatar
    177cce46
    c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according to warn_c90_c99_compat. · 177cce46
    Marek Polacek authored
    gcc/c-family/
    	* c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
    	to warn_c90_c99_compat.
    	* c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
    	to -1.
    gcc/c/
    	* c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
    	to pedwarn_c90.
    	* c-errors.c: Include "opts.h".
    	(pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
    	* c-parser.c (disable_extension_diagnostics): Handle negative value
    	of warn_c90_c99_compat, too.
    	(restore_extension_diagnostics): Likewise.
    	(c_parser_compound_statement_nostart): Pass
    	OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
    gcc/testsuite/
    	* gcc.dg/Wc90-c99-compat-4.c: Remove all dg-warnings.
    	* gcc.dg/Wc90-c99-compat-5.c: Remove all dg-errors.
    	* gcc.dg/Wc90-c99-compat-7.c: New test.
    	* gcc.dg/Wc90-c99-compat-8.c: New test.
    	* gcc.dg/Wdeclaration-after-statement-4.c: New test.
    libcpp/
    	* charset.c (_cpp_valid_ucn): Warn only if -Wc90-c99-compat.
    	* lex.c (_cpp_lex_direct): Likewise.
    	* macro.c (replace_args): Likewise.
    	(parse_params): Likewise.
    	* include/cpplib.h (cpp_options): Change cpp_warn_c90_c99_compat
    	to char.
    
    From-SVN: r214131
    177cce46
    History
    c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according to warn_c90_c99_compat.
    Marek Polacek authored
    gcc/c-family/
    	* c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
    	to warn_c90_c99_compat.
    	* c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
    	to -1.
    gcc/c/
    	* c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
    	to pedwarn_c90.
    	* c-errors.c: Include "opts.h".
    	(pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
    	* c-parser.c (disable_extension_diagnostics): Handle negative value
    	of warn_c90_c99_compat, too.
    	(restore_extension_diagnostics): Likewise.
    	(c_parser_compound_statement_nostart): Pass
    	OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
    gcc/testsuite/
    	* gcc.dg/Wc90-c99-compat-4.c: Remove all dg-warnings.
    	* gcc.dg/Wc90-c99-compat-5.c: Remove all dg-errors.
    	* gcc.dg/Wc90-c99-compat-7.c: New test.
    	* gcc.dg/Wc90-c99-compat-8.c: New test.
    	* gcc.dg/Wdeclaration-after-statement-4.c: New test.
    libcpp/
    	* charset.c (_cpp_valid_ucn): Warn only if -Wc90-c99-compat.
    	* lex.c (_cpp_lex_direct): Likewise.
    	* macro.c (replace_args): Likewise.
    	(parse_params): Likewise.
    	* include/cpplib.h (cpp_options): Change cpp_warn_c90_c99_compat
    	to char.
    
    From-SVN: r214131