aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/match.c
diff options
context:
space:
mode:
authorManuel López-Ibáñez <manu@gcc.gnu.org>2015-05-23 23:02:52 +0000
committerManuel López-Ibáñez <manu@gcc.gnu.org>2015-05-23 23:02:52 +0000
commitfea70c996318f9b987ae9da6d35d6b24ca720f5c (patch)
tree1b79430e59e975a3a6876ac5c5ead97b2768f624 /gcc/fortran/match.c
parent84a3423b97784ba86bcb37efb39fd528de3671cb (diff)
downloadgcc-fea70c996318f9b987ae9da6d35d6b24ca720f5c.zip
gcc-fea70c996318f9b987ae9da6d35d6b24ca720f5c.tar.gz
gcc-fea70c996318f9b987ae9da6d35d6b24ca720f5c.tar.bz2
re PR fortran/44054 (Handle -Werror, -Werror=, -fdiagnostics-show-option, !GCC$ diagnostic (pragmas) and color)
gcc/fortran/ChangeLog: 2015-05-24 Manuel López-Ibáñez <manu@gcc.gnu.org> PR fortran/44054 * gfortran.h (struct gfc_error_buf): Rename as gfc_error_buffer. Move closer to push, pop and free methods. Reimplement using an output_buffer. * error.c (errors, warnings, warning_buffer, cur_error_buffer): Delete everywhere in this file. (error_char): Delete all contents. (gfc_increment_error_count): Delete. (gfc_error_now): Update comment. Set error_buffer.flag. (gfc_warning_check): Do not handle warning_buffer. (gfc_error_1): Delete. (gfc_error_now_1): Delete. (gfc_error_check): Simplify. (gfc_move_error_buffer_from_to): Renamed from gfc_move_output_buffer_from_to. (gfc_push_error): Handle only gfc_error_buffer. (gfc_pop_error): Likewise. (gfc_free_error): Likewise. (gfc_get_errors): Remove warnings and errors. (gfc_diagnostics_init): Use static error_buffer. (gfc_error_1,gfc_error_now_1): Delete declarations. * symbol.c, decl.c, trans-common.c, data.c, expr.c, expr.c, frontend-passes.c, resolve.c, match.c, parse.c: Replace gfc_error_1 with gfc_error and gfc_error_now_1 with gfc_error_1 everywhere. * f95-lang.c (gfc_be_parse_file): Do not update errorcount and warningcount here. * primary.c (match_complex_constant): Replace gfc_error_buf and output_buffer with gfc_error_buffer. From-SVN: r223614
Diffstat (limited to 'gcc/fortran/match.c')
-rw-r--r--gcc/fortran/match.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c
index 3e12483..2e15af2 100644
--- a/gcc/fortran/match.c
+++ b/gcc/fortran/match.c
@@ -3599,7 +3599,7 @@ alloc_opt_list:
/* The next 2 conditionals check C631. */
if (ts.type != BT_UNKNOWN)
{
- gfc_error_1 ("SOURCE tag at %L conflicts with the typespec at %L",
+ gfc_error ("SOURCE tag at %L conflicts with the typespec at %L",
&tmp->where, &old_locus);
goto cleanup;
}
@@ -3636,7 +3636,7 @@ alloc_opt_list:
/* Check F08:C637. */
if (ts.type != BT_UNKNOWN)
{
- gfc_error_1 ("MOLD tag at %L conflicts with the typespec at %L",
+ gfc_error ("MOLD tag at %L conflicts with the typespec at %L",
&tmp->where, &old_locus);
goto cleanup;
}
@@ -3662,8 +3662,8 @@ alloc_opt_list:
/* Check F08:C637. */
if (source && mold)
{
- gfc_error_1 ("MOLD tag at %L conflicts with SOURCE tag at %L",
- &mold->where, &source->where);
+ gfc_error ("MOLD tag at %L conflicts with SOURCE tag at %L",
+ &mold->where, &source->where);
goto cleanup;
}
@@ -4350,12 +4350,12 @@ gfc_match_common (void)
/* If we find an error, just print it and continue,
cause it's just semantic, and we can see if there
are more errors. */
- gfc_error_now_1 ("Variable '%s' at %L in common block '%s' "
- "at %C must be declared with a C "
- "interoperable kind since common block "
- "'%s' is bind(c)",
- sym->name, &(sym->declared_at), t->name,
- t->name);
+ gfc_error_now ("Variable %qs at %L in common block %qs "
+ "at %C must be declared with a C "
+ "interoperable kind since common block "
+ "%qs is bind(c)",
+ sym->name, &(sym->declared_at), t->name,
+ t->name);
}
if (sym->attr.is_bind_c == 1)
@@ -4889,8 +4889,7 @@ recursive_stmt_fcn (gfc_expr *e, gfc_symbol *sym)
match
gfc_match_st_function (void)
{
- gfc_error_buf old_error_1;
- output_buffer old_error;
+ gfc_error_buffer old_error;
gfc_symbol *sym;
gfc_expr *expr;
@@ -4900,7 +4899,7 @@ gfc_match_st_function (void)
if (m != MATCH_YES)
return m;
- gfc_push_error (&old_error, &old_error_1);
+ gfc_push_error (&old_error);
if (!gfc_add_procedure (&sym->attr, PROC_ST_FUNCTION, sym->name, NULL))
goto undo_error;
@@ -4912,7 +4911,7 @@ gfc_match_st_function (void)
if (m == MATCH_NO)
goto undo_error;
- gfc_free_error (&old_error, &old_error_1);
+ gfc_free_error (&old_error);
if (m == MATCH_ERROR)
return m;
@@ -4931,7 +4930,7 @@ gfc_match_st_function (void)
return MATCH_YES;
undo_error:
- gfc_pop_error (&old_error, &old_error_1);
+ gfc_pop_error (&old_error);
return MATCH_NO;
}