diff options
author | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2012-04-22 19:17:47 +0000 |
---|---|---|
committer | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2012-04-22 19:17:47 +0000 |
commit | c1771a200ab9fd1e9afc921684daab9a8649d897 (patch) | |
tree | 25f6840e8f549e45366fc499af6bd5be146d1839 /gcc/c-family/c-common.c | |
parent | f12e8bd5c3e7063f4e616bda3cab540ea73ac446 (diff) | |
download | gcc-c1771a200ab9fd1e9afc921684daab9a8649d897.zip gcc-c1771a200ab9fd1e9afc921684daab9a8649d897.tar.gz gcc-c1771a200ab9fd1e9afc921684daab9a8649d897.tar.bz2 |
re PR c/44774 (-Werror=edantic)
2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/44774
gcc/
* doc/invoke.texi (pedantic): Rename to Wpedantic.
* common.opt (Wpedantic): New.
(pedantic): Alias Wpedantic.
* diagnostic.c (warning_at): Likewise.
* c-decl.c (diagnose_mismatched_decls): Likewise.
(build_array_declarator): Likewise.
(mark_forward_parm_decls):
(check_bitfield_type_and_width): Likewise.
(grokdeclarator): Likewise.
(grokfield): Likewise.
(finish_struct): Likewise.
(build_enumerator): Likewise.
(store_parm_decls_oldstyle): Likewise.
(declspecs_add_qual): Likewise.
(declspecs_add_type): Likewise.
(finish_declspecs): Likewise.
* c-typeck.c (composite_type): Likewise.
(comp_target_types): Likewise.
(build_array_ref): Likewise.
(pointer_diff): Likewise.
(build_unary_op): Likewise.
(build_conditional_expr): Likewise.
(build_c_cast): Likewise.
(convert_for_assignment): Likewise.
(maybe_warn_string_init): Likewise.
(digest_init): Likewise.
(pop_init_level): Likewise.
(set_init_index): Likewise.
(c_finish_goto_label): Likewise.
(c_finish_return): Likewise.
(do_case): Likewise.
(build_binary_op): Likewise.
* c-parser.c (static): Likewise.
(c_parser_external_declaration): Likewise.
(c_parser_declaration_or_fndef): Likewise.
(c_parser_static_assert_declaration_no_se): Likewise.
(c_parser_enum_specifier): Likewise.
(c_parser_struct_or_union_specifier): Likewise.
(c_parser_struct_declaration): Likewise.
(c_parser_alignas_specifier): Likewise.
(c_parser_braced_init): Likewise.
(c_parser_initelt): Likewise.
(c_parser_compound_statement_nostart): Likewise.
(c_parser_conditional_expression): Likewise.
(c_parser_alignof_expression): Likewise.
(c_parser_postfix_expression): Likewise.
(c_parser_postfix_expression_after_paren_): Likewise.
(c_parser_objc_class_instance_variables): Likewise.
(c_parser_objc_method_definition): Likewise.
(c_parser_objc_methodprotolist): Likewise.
c-family/
* c.opt (Wpedantic): New.
(pedantic): Alias Wpedantic.
* c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
(c_common_post_options): Likewise.
(sanitize_cpp_opts): Likewise.
* c-lex.c (interpret_float): Likewise.
* c-format.c (check_format_types): Likewise.
* c-common.c (pointer_int_sum): Likewise.
(c_sizeof_or_alignof_type): Likewise.
(c_add_case_label): Likewise.
(c_do_switch_warnings): Likewise.
* c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
cp/
* typeck.c (composite_pointer_type): Likewise.
(cxx_sizeof_or_alignof_type): Likewise.
(cp_build_array_ref): Likewise.
(cp_build_function_call_vec): Likewise.
(cp_build_addr_expr_1): Likewise.
(convert_member_func_to_ptr): Likewise.
* decl.c (check_tag_decl): Likewise.
(check_static_variable_definition): Likewise.
(compute_array_index_type): Likewise.
(create_array_type_for_decl): Likewise.
(grokdeclarator): Likewise.
(grok_op_properties): Likewise.
* error.c (maybe_warn_cpp0x): Likewise.
* pt.c (maybe_process_partial_specialization): Likewise.
(convert_template_argument): Likewise.
(do_decl_instantiation): Likewise.
(do_type_instantiation): Likewise.
* parser.c (cp_parser_primary_expression): Likewise.
(cp_parser_postfix_expression): Likewise.
(cp_parser_unary_expression): Likewise.
(cp_parser_question_colon_clause): Likewise.
(cp_parser_lambda_introducer): Likewise.
(cp_parser_lambda_declarator_opt): Likewise.
(cp_parser_compound_statement): Likewise.
(cp_parser_jump_statement): Likewise.
(cp_parser_declaration_seq_opt): Likewise.
(cp_parser_enum_specifier): Likewise.
(cp_parser_enumerator_list): Likewise.
(cp_parser_initializer_list): Likewise.
(cp_parser_member_declaration): Likewise.
* call.c (build_conditional_expr_1): Likewise.
* friend.c (make_friend_class): Likewise.
* name-lookup.c (pushdecl_maybe_friend_1): Likewise.
From-SVN: r186681
Diffstat (limited to 'gcc/c-family/c-common.c')
-rw-r--r-- | gcc/c-family/c-common.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index 339eefe..4eacd19 100644 --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -3858,19 +3858,19 @@ pointer_int_sum (location_t loc, enum tree_code resultcode, if (TREE_CODE (TREE_TYPE (result_type)) == VOID_TYPE) { - pedwarn (loc, pedantic ? OPT_pedantic : OPT_Wpointer_arith, + pedwarn (loc, pedantic ? OPT_Wpedantic : OPT_Wpointer_arith, "pointer of type %<void *%> used in arithmetic"); size_exp = integer_one_node; } else if (TREE_CODE (TREE_TYPE (result_type)) == FUNCTION_TYPE) { - pedwarn (loc, pedantic ? OPT_pedantic : OPT_Wpointer_arith, + pedwarn (loc, pedantic ? OPT_Wpedantic : OPT_Wpointer_arith, "pointer to a function used in arithmetic"); size_exp = integer_one_node; } else if (TREE_CODE (TREE_TYPE (result_type)) == METHOD_TYPE) { - pedwarn (loc, pedantic ? OPT_pedantic : OPT_Wpointer_arith, + pedwarn (loc, pedantic ? OPT_Wpedantic : OPT_Wpointer_arith, "pointer to member function used in arithmetic"); size_exp = integer_one_node; } @@ -4449,7 +4449,7 @@ c_sizeof_or_alignof_type (location_t loc, if (is_sizeof) { if (complain && (pedantic || warn_pointer_arith)) - pedwarn (loc, pedantic ? OPT_pedantic : OPT_Wpointer_arith, + pedwarn (loc, pedantic ? OPT_Wpedantic : OPT_Wpointer_arith, "invalid application of %<sizeof%> to a function type"); else if (!complain) return error_mark_node; @@ -4460,10 +4460,10 @@ c_sizeof_or_alignof_type (location_t loc, if (complain) { if (c_dialect_cxx ()) - pedwarn (loc, OPT_pedantic, "ISO C++ does not permit " + pedwarn (loc, OPT_Wpedantic, "ISO C++ does not permit " "%<alignof%> applied to a function type"); else - pedwarn (loc, OPT_pedantic, "ISO C does not permit " + pedwarn (loc, OPT_Wpedantic, "ISO C does not permit " "%<_Alignof%> applied to a function type"); } value = size_int (FUNCTION_BOUNDARY / BITS_PER_UNIT); @@ -4473,7 +4473,7 @@ c_sizeof_or_alignof_type (location_t loc, { if (type_code == VOID_TYPE && complain && (pedantic || warn_pointer_arith)) - pedwarn (loc, pedantic ? OPT_pedantic : OPT_Wpointer_arith, + pedwarn (loc, pedantic ? OPT_Wpedantic : OPT_Wpointer_arith, "invalid application of %qs to a void type", op_name); else if (!complain) return error_mark_node; @@ -5441,7 +5441,7 @@ c_add_case_label (location_t loc, splay_tree cases, tree cond, tree orig_type, /* Case ranges are a GNU extension. */ if (high_value) - pedwarn (loc, OPT_pedantic, + pedwarn (loc, OPT_Wpedantic, "range expressions in switch statements are non-standard"); type = TREE_TYPE (cond); @@ -5755,7 +5755,7 @@ finish_label_address_expr (tree label, location_t loc) { tree result; - pedwarn (input_location, OPT_pedantic, "taking the address of a label is non-standard"); + pedwarn (input_location, OPT_Wpedantic, "taking the address of a label is non-standard"); if (label == error_mark_node) return error_mark_node; |