From 4daa149b86a42d1d10a735889c5f9cd6a0bca09e Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Tue, 25 Nov 2014 23:33:32 +0100 Subject: gfortran.h (gfc_option_t): Remove flags moved as Var to .opt. 2014-11-25 Tobias Burnus gcc/fortran/ * gfortran.h (gfc_option_t): Remove flags moved as Var to .opt. (gfc_error_now_1): Renamed from gfc_error_now. (gfc_error_now): Renamed from gfc_error_now_2. (gfc_warning_now_1): Renamed from gfc_warning_now. (gfc_warning_now): Renamed from gfc_warning_now_2. * error.c (gfc_error_now_1): Renamed from gfc_error_now. (gfc_error_now): Renamed from gfc_error_now_2. (gfc_warning_now_1): Renamed from gfc_warning_now. (gfc_warning_now): Renamed from gfc_warning_now_2. (gfc_get_errors): Include common diagnostic in count. * lang.opt (Wc-binding-type, Wconversion, Wconversion-extra, Wintrinsics-std): Create a Var for those warnings. * check.c (gfc_check_cmplx): Pass warning flag to diagnostic function. * decl.c (get_proc_name, gfc_verify_c_interop_param, build_sym gfc_set_constant_character_len, verify_bind_c_sym): Ditto; use _1 for old diagnostic, remove _2 for new diagnostic. * expr.c (gfc_check_assign, gfc_check_vardef_context): Ditto. * frontend-passes.c (doloop_code, do_function): Ditto. * intrinsic.c (gfc_is_intrinsic, gfc_convert_type_warn): Ditto. * match.c (gfc_match_common): Ditto. * module.c (use_iso_fortran_env_module, gfc_use_module): Ditto. * parse.c (decode_statement, decode_gcc_attribute, next_free, next_fixed, gfc_check_do_variable): Ditto. * resolve.c (resolve_common_vars, resolve_ordinary_assign): Ditto. * scanner.c (add_path_to_list, skip_free_comments, gfc_next_char_literal, gfc_gobble_whitespace, load_line, preprocessor_line, load_file): Ditto. * symbol.c (gfc_set_default_type, verify_bind_c_derived_type): Ditto. * options.c (gfc_post_options): Ditto. (gfc_init_options, set_Wall, gfc_handle_option): Ditto; remove flags which now have a Var. * invoke.texi (Wconversion-extra): Make clear that the flag does not imply -Wconversion. gcc/testsuite/ * gfortran.dg/empty_label.f: Change test to continue testing for -fmax-errors=1. * gfortran.dg/empty_label.f90: Ditto. * gfortran.dg/warnings_are_errors_1.f90: Update dg-*. From-SVN: r218067 --- gcc/fortran/resolve.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'gcc/fortran/resolve.c') diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 6dc1585..08bbda4 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -924,7 +924,7 @@ resolve_common_vars (gfc_symbol *sym, bool named_common) } if (UNLIMITED_POLY (csym)) - gfc_error_now ("'%s' in cannot appear in COMMON at %L " + gfc_error_now ("%qs in cannot appear in COMMON at %L " "[F2008:C5100]", csym->name, &csym->declared_at); if (csym->ts.type != BT_DERIVED) @@ -932,15 +932,15 @@ resolve_common_vars (gfc_symbol *sym, bool named_common) if (!(csym->ts.u.derived->attr.sequence || csym->ts.u.derived->attr.is_bind_c)) - gfc_error_now ("Derived type variable '%s' in COMMON at %L " + gfc_error_now ("Derived type variable %qs in COMMON at %L " "has neither the SEQUENCE nor the BIND(C) " "attribute", csym->name, &csym->declared_at); if (csym->ts.u.derived->attr.alloc_comp) - gfc_error_now ("Derived type variable '%s' in COMMON at %L " + gfc_error_now ("Derived type variable %qs in COMMON at %L " "has an ultimate component that is " "allocatable", csym->name, &csym->declared_at); if (gfc_has_default_initializer (csym->ts.u.derived)) - gfc_error_now ("Derived type variable '%s' in COMMON at %L " + gfc_error_now ("Derived type variable %qs in COMMON at %L " "may not have default initializer", csym->name, &csym->declared_at); @@ -9224,10 +9224,10 @@ resolve_ordinary_assign (gfc_code *code, gfc_namespace *ns) rlen = mpz_get_si (rhs->ts.u.cl->length->value.integer); if (rlen && llen && rlen > llen) - gfc_warning_now_2 (OPT_Wcharacter_truncation, - "CHARACTER expression will be truncated " - "in assignment (%d/%d) at %L", - llen, rlen, &code->loc); + gfc_warning_now (OPT_Wcharacter_truncation, + "CHARACTER expression will be truncated " + "in assignment (%d/%d) at %L", + llen, rlen, &code->loc); } /* Ensure that a vector index expression for the lvalue is evaluated -- cgit v1.1