From 07317e6985727a04296a7c5cbdaed8e4555f3038 Mon Sep 17 00:00:00 2001 From: manu Date: Sun, 2 Mar 2008 15:45:29 +0000 Subject: 2008-03-02 Manuel Lopez-Ibanez PR 24924 * c-common.c (flag_permissive): Delete. (constant_expression_warnings): Check flags first. (constant_expression_error): New. * c-common.h (flag_permissive): Delete. (constant_expression_error): Declare. * flags.h (flag_permissive): Declare. Update description. * diagnostic.c (pedwarn): Update. (permerror): New. * diagnostic.h: (pedantic_error_kind): Rename as pedantic_warning_kind. (permissive_error_kind): New. * toplev.c (flag_permissive): Define. Update description. * toplev.h (permissive_error_kind): Declare. * c-errors.c (pedwarn_c99): Use pedantic_warning_kind. (pedwarn_c90): Use pedantic_warning_kind. * c-opts.c (c_common_post_options): flag_permissive does not affect flag_pedantic_errors. cp/ * class.c (finish_struct_anon): Use permerror instead of pedwarn. (check_field_decls): Likewise. (note_name_declared_in_class): Likewise. * call.c (build_new_op): Likewise. (convert_like_real): Likewise. (build_over_call): Likewise. * lex.c (unqualified_fn_lookup_error): Likewise. * parser.c (cp_parser_template_id): Likewise. * cvt.c (warn_ref_binding): Likewise. (convert_to_reference): Likewise. (ocp_convert): Likewise. (convert_to_void): Use error instead of pedwarn. * error.c (cp_cpp_error): Use pedantic_warning_kind. * decl.c (compute_array_index_type): Use constant_expression_error. testsuite/ * g++.dg/cpp/string-2.C: This is a warning now. * g++.dg/cpp/pedantic-errors.C: -pedantic-errors is not enabled by default, so add it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132817 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/c-opts.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'gcc/c-opts.c') diff --git a/gcc/c-opts.c b/gcc/c-opts.c index d7409adcccc..69c4d544885 100644 --- a/gcc/c-opts.c +++ b/gcc/c-opts.c @@ -1107,18 +1107,6 @@ c_common_post_options (const char **pfilename) /* Adjust various flags for C++ based on command-line settings. */ if (c_dialect_cxx ()) { - if (!flag_permissive) - { - flag_pedantic_errors = 1; - /* FIXME: For consistency pedantic_errors should have the - same value in the front-end and in CPP. However, this - will break existing applications. The right fix is - disentagle flag_permissive from flag_pedantic_errors, - create a new diagnostic function permerror that is - controlled by flag_permissive and convert most C++ - pedwarns to this new function. - cpp_opts->pedantic_errors = 1; */ - } if (!flag_no_inline) { flag_inline_trees = 1; -- cgit v1.2.3