This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [4.4] [C++] separate pedwarns and permissive errors.


On 29/02/2008, Gabriel Dos Reis <gdr@integrable-solutions.net> wrote:
> On Fri, Feb 22, 2008 at 5:59 AM, Manuel López-Ibáñez
>  <lopezibanez@gmail.com> wrote:
>  > An updated version of the patch posted (and discussed) here:
>  >  http://gcc.gnu.org/ml/gcc-patches/2008-01/msg00583.html
>  >
>  >  Bootstrapped and tested on x86_64-unknown-linux-gnu.
>  >
>  >  2008-01-13  Manuel López-Ibáñez  <manu@gcc.gnu.org>
>  >
>  >   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/
>  >   PR 24924
>  >   * 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/
>  >   PR 24924
>  >   * 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.
>  >
>  >  OK to commit to trunk?
>  >
>  >  Cheers,
>  >
>  >  Manuel.
>  >
>
>
> OK.
>


Should I add a little note in gcc-4.4/changes.html ? Such as:

* The C++ front end now differentiates between pedantic warnings and
permissive errors. The former are controlled by -pedantic and
-pedantic-errors, while the latter are errors that can be downgraded
to warnings.  As a result, some diagnostics that used to be errors are
now just warnings. Please, refer to the GCC manual for further
information about these options.

Cheers,

Manuel.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]