gcc/libcpp
Marek Polacek f3bede7188 re PR c/51849 (-Wc99-compat would be considered useful)
PR c/51849
gcc/
	* gcc/doc/invoke.texi: Document -Wc90-c99-compat.
gcc/c-family/
	* c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
	* c.opt (Wc90-c99-compat): Add option.
gcc/c/
	* c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
	Call pedwarn_c90 instead of pedwarn.
	(check_bitfield_type_and_width): Likewise.
	(declspecs_add_qual): Likewise.
	(declspecs_add_type): Likewise.
	(warn_variable_length_array): Unify function for -pedantic and -Wvla.
	Adjust to only call pedwarn_c90.
	(grokdeclarator): Remove pedantic && !flag_isoc99 check.  Call
	pedwarn_c90 instead of pedwarn.
	* c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
	* c-parser.c (disable_extension_diagnostics): Handle
	warn_c90_c99_compat.
	(restore_extension_diagnostics): Likewise.
	(c_parser_enum_specifier): Remove check for !flag_isoc99.  Call
	pedwarn_c90 instead of pedwarn.
	(c_parser_initelt): Likewise.
	(c_parser_postfix_expression): Likewise.
	(c_parser_postfix_expression_after_paren_type): Likewise.
	(c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
	* c-tree.h: Fix formatting.
	* c-typeck.c (build_array_ref): Remove check for !flag_isoc99.  Call
	pedwarn_c90 instead of pedwarn.
gcc/testsuite/
	* gcc.dg/Wc90-c99-compat-1.c: New test.
	* gcc.dg/Wc90-c99-compat-2.c: New test.
	* gcc.dg/Wc90-c99-compat-3.c: New test.
	* gcc.dg/Wc90-c99-compat-4.c: New test.
	* gcc.dg/Wc90-c99-compat-5.c: New test.
	* gcc.dg/Wc90-c99-compat-6.c: New test.
	* gcc.dg/wvla-1.c: Adjust dg-warning.
	* gcc.dg/wvla-2.c: Adjust dg-warning.
	* gcc.dg/wvla-4.c: Adjust dg-warning.
	* gcc.dg/wvla-6.c: Adjust dg-warning.
libcpp/
	* lex.c (_cpp_lex_direct): Warn when -Wc90-c99-compat is in effect.
	* charset.c (_cpp_valid_ucn): Likewise.
	* include/cpplib.h (cpp_options): Add cpp_warn_c90_c99_compat.
	* macro.c (replace_args): Warn when -Wc90-c99-compat is in effect.
	(parse_params): Likewise.

From-SVN: r213786
2014-08-10 06:10:49 +00:00
..
include re PR c/51849 (-Wc99-compat would be considered useful) 2014-08-10 06:10:49 +00:00
po * de.po: Update. 2014-03-18 16:04:06 +00:00
ChangeLog re PR c/51849 (-Wc99-compat would be considered useful) 2014-08-10 06:10:49 +00:00
Makefile.in Update copyright years in libcpp/ 2014-01-02 22:24:45 +00:00
aclocal.m4 Undo inadvertent commit in rev 160105. 2010-06-01 10:20:24 -04:00
charset.c re PR c/51849 (-Wc99-compat would be considered useful) 2014-08-10 06:10:49 +00:00
config.in configure.ac: Remove long long and __int64 type checks... 2014-05-26 08:19:02 +00:00
configure configure.ac: Remove long long and __int64 type checks... 2014-05-26 08:19:02 +00:00
configure.ac configure.ac: Remove long long and __int64 type checks... 2014-05-26 08:19:02 +00:00
directives-only.c Update copyright years in libcpp/ 2014-01-02 22:24:45 +00:00
directives.c Update copyright years in libcpp/ 2014-01-02 22:24:45 +00:00
errors.c Update copyright years in libcpp/ 2014-01-02 22:24:45 +00:00
expr.c Update copyright years in libcpp/ 2014-01-02 22:24:45 +00:00
files.c re PR c/61212 (gcc build failure on "dos file system" due to warnings treated as errors) 2014-05-21 18:54:12 +00:00
identifiers.c Update copyright years in libcpp/ 2014-01-02 22:24:45 +00:00
init.c files.c (find_file_in_dir): Always try to shorten for DOS non-system headers. 2014-05-09 08:50:22 +00:00
internal.h Update copyright years in libcpp/ 2014-01-02 22:24:45 +00:00
lex.c re PR c/51849 (-Wc99-compat would be considered useful) 2014-08-10 06:10:49 +00:00
line-map.c Support location tracking for built-in macro tokens 2014-07-16 12:33:27 +02:00
macro.c re PR c/51849 (-Wc99-compat would be considered useful) 2014-08-10 06:10:49 +00:00
makeucnid.c Update copyright years in libcpp/ 2014-01-02 22:24:45 +00:00
mkdeps.c Update copyright years in libcpp/ 2014-01-02 22:24:45 +00:00
pch.c Update copyright years in libcpp/ 2014-01-02 22:24:45 +00:00
symtab.c Update copyright years in libcpp/ 2014-01-02 22:24:45 +00:00
system.h Update copyright years in libcpp/ 2014-01-02 22:24:45 +00:00
traditional.c Update copyright years in libcpp/ 2014-01-02 22:24:45 +00:00
ucnid.h Update copyright years in libcpp/ 2014-01-02 22:24:45 +00:00
ucnid.tab Update copyright years in libcpp/ 2014-01-02 22:24:45 +00:00