aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/decl.c
diff options
context:
space:
mode:
authorManuel López-Ibáñez <manu@gcc.gnu.org>2014-11-23 23:47:42 +0000
committerManuel López-Ibáñez <manu@gcc.gnu.org>2014-11-23 23:47:42 +0000
commita96c39eaa1343c2b8ec2ba9529ea9e88722a2619 (patch)
treef611b28dd269fb7e389fd5408fb94d4f9fe5416f /gcc/fortran/decl.c
parent875d4ba74588d8c937e553432bf52b655d488056 (diff)
downloadgcc-a96c39eaa1343c2b8ec2ba9529ea9e88722a2619.zip
gcc-a96c39eaa1343c2b8ec2ba9529ea9e88722a2619.tar.gz
gcc-a96c39eaa1343c2b8ec2ba9529ea9e88722a2619.tar.bz2
re PR fortran/44054 (Handle -Werror, -Werror=, -fdiagnostics-show-option, !GCC$ diagnostic (pragmas) and color)
gcc/fortran/ChangeLog: 2014-11-23 Manuel López-Ibáñez <manu@gcc.gnu.org> PR fortran/44054 * decl.c (gfc_verify_c_interop_param): Use gfc_error_now_2. (gfc_set_constant_character_len): Use gfc_warning_now_2. * resolve.c (resolve_ordinary_assign): Likewise. * gfortran.h (warn_character_truncation): Do not declare here. * error.c (gfc_format_decoder): Handle %L. * lang.opt (Wcharacter-truncation): Add Var and LangEnabledBy. * options.c (gfc_init_options): Do not handle warn_character_truncation explicitly. (set_Wall): Likewise. (gfc_handle_option): Likewise. From-SVN: r217992
Diffstat (limited to 'gcc/fortran/decl.c')
-rw-r--r--gcc/fortran/decl.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index e4e41cb..45e5b6c 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -990,10 +990,9 @@ gfc_verify_c_interop_param (gfc_symbol *sym)
{
if (sym->attr.is_bind_c == 0)
{
- gfc_error_now ("Procedure '%s' at %L must have the BIND(C) "
- "attribute to be C interoperable", sym->name,
- &(sym->declared_at));
-
+ gfc_error_now_2 ("Procedure %qs at %L must have the BIND(C) "
+ "attribute to be C interoperable", sym->name,
+ &(sym->declared_at));
return false;
}
else
@@ -1224,9 +1223,10 @@ gfc_set_constant_character_len (int len, gfc_expr *expr, int check_len)
if (len > slen)
gfc_wide_memset (&s[slen], ' ', len - slen);
- if (gfc_option.warn_character_truncation && slen > len)
- gfc_warning_now ("CHARACTER expression at %L is being truncated "
- "(%d/%d)", &expr->where, slen, len);
+ if (warn_character_truncation && slen > len)
+ gfc_warning_now_2 (OPT_Wcharacter_truncation,
+ "CHARACTER expression at %L is being truncated "
+ "(%d/%d)", &expr->where, slen, len);
/* Apply the standard by 'hand' otherwise it gets cleared for
initializers. */