From 2b71f4a4f8515c5d0919fc5c220f427e7c837e7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20L=C3=B3pez-Ib=C3=A1=C3=B1ez?= Date: Thu, 4 Sep 2014 15:13:40 +0000 Subject: options.texi: Document that Var and Init are required if CPP is given. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gcc/ChangeLog: 2014-09-04 Manuel López-Ibáñez * doc/options.texi: Document that Var and Init are required if CPP is given. * optc-gen.awk: Require Var and Init if CPP is given. * common.opt (Wpedantic): Use Init. libcpp/ChangeLog: 2014-09-04 Manuel López-Ibáñez * macro.c (replace_args): Use cpp_pedwarning, cpp_warning and CPP_W flags. * include/cpplib.h: Add CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC. * init.c (cpp_create_reader): Do not init to -1 here. * expr.c (num_binary_op): Use cpp_pedwarning. gcc/c-family/ChangeLog: 2014-09-04 Manuel López-Ibáñez * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels, Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic, (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var and Init. * c-opts.c (c_common_handle_option): Do not handle here. (sanitize_cpp_opts): Likewise. * c-common.c (struct reason_option_codes_t): Handle CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC. gcc/testsuite/ChangeLog: 2014-09-04 Manuel López-Ibáñez * gcc.dg/cpp/endif-pedantic2.c: More general options do not override specific ones, but specific ones do. From-SVN: r214904 --- libcpp/init.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libcpp/init.c') diff --git a/libcpp/init.c b/libcpp/init.c index 2998d88..d612374 100644 --- a/libcpp/init.c +++ b/libcpp/init.c @@ -185,6 +185,7 @@ cpp_create_reader (enum c_lang lang, cpp_hash_table *table, CPP_OPTION (pfile, operator_names) = 1; CPP_OPTION (pfile, warn_trigraphs) = 2; CPP_OPTION (pfile, warn_endif_labels) = 1; + CPP_OPTION (pfile, cpp_warn_c90_c99_compat) = -1; CPP_OPTION (pfile, cpp_warn_deprecated) = 1; CPP_OPTION (pfile, cpp_warn_long_long) = 0; CPP_OPTION (pfile, dollars_in_ident) = 1; -- cgit v1.1