diff options
author | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-12-02 23:39:49 +0000 |
---|---|---|
committer | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-12-02 23:39:49 +0000 |
commit | fbc626413f560251434cbdb5bac760b700a4d3cd (patch) | |
tree | 0d2d9e85f904df0453d83c5f4d238d739d7db369 /gcc/fortran | |
parent | 9ce648e26846583b5b4057e3ea00a53dcda10903 (diff) | |
download | gcc-fbc626413f560251434cbdb5bac760b700a4d3cd.tar.gz |
2014-12-02 Tobias Burnus <burnus@net-b.de>
Manuel López-Ibáñez <manu@gcc.gnu.org>
* error.c (warnings_not_errors): Use bool.
(gfc_clear_error): Update.
(gfc_get_errors): Ditto. Use bool argument.
* gfortran.h (gfc_get_errors): Update prototype.
* resolve.c (resolve_global_procedure): Update call.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218296 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/fortran/error.c | 8 | ||||
-rw-r--r-- | gcc/fortran/gfortran.h | 2 | ||||
-rw-r--r-- | gcc/fortran/resolve.c | 6 |
4 files changed, 17 insertions, 8 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 4bf21edef60..23ddc2593c8 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,12 @@ +2014-12-02 Tobias Burnus <burnus@net-b.de> + Manuel López-Ibáñez <manu@gcc.gnu.org> + + * error.c (warnings_not_errors): Use bool. + (gfc_clear_error): Update. + (gfc_get_errors): Ditto. Use bool argument. + * gfortran.h (gfc_get_errors): Update prototype. + * resolve.c (resolve_global_procedure): Update call. + 2014-12-02 Richard Biener <rguenther@suse.de> PR fortran/64137 diff --git a/gcc/fortran/error.c b/gcc/fortran/error.c index 00e92280ce3..70429d3e122 100644 --- a/gcc/fortran/error.c +++ b/gcc/fortran/error.c @@ -44,7 +44,7 @@ along with GCC; see the file COPYING3. If not see static int suppress_errors = 0; -static int warnings_not_errors = 0; +static bool warnings_not_errors = false; static int terminal_width, buffer_flag, errors, warnings; @@ -1302,7 +1302,7 @@ void gfc_clear_error (void) { error_buffer.flag = 0; - warnings_not_errors = 0; + warnings_not_errors = false; } @@ -1395,9 +1395,9 @@ gfc_get_errors (int *w, int *e) /* Switch errors into warnings. */ void -gfc_errors_to_warnings (int f) +gfc_errors_to_warnings (bool f) { - warnings_not_errors = (f == 1) ? 1 : 0; + warnings_not_errors = f; } void diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h index 10585025f97..1bf9862d23c 100644 --- a/gcc/fortran/gfortran.h +++ b/gcc/fortran/gfortran.h @@ -2701,7 +2701,7 @@ void gfc_pop_error (gfc_error_buf *); void gfc_free_error (gfc_error_buf *); void gfc_get_errors (int *, int *); -void gfc_errors_to_warnings (int); +void gfc_errors_to_warnings (bool); /* arith.c */ void gfc_arith_init_1 (void); diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 9d7d3c25be0..dfc2eb67d95 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -2431,7 +2431,7 @@ resolve_global_procedure (gfc_symbol *sym, locus *where, if (!pedantic && (gfc_option.allow_std & GFC_STD_GNU)) /* Turn erros into warnings with -std=gnu and -std=legacy. */ - gfc_errors_to_warnings (1); + gfc_errors_to_warnings (true); if (!gfc_compare_interfaces (sym, def_sym, sym->name, 0, 1, reason, sizeof(reason), NULL, NULL)) @@ -2444,14 +2444,14 @@ resolve_global_procedure (gfc_symbol *sym, locus *where, if (!pedantic || ((gfc_option.warn_std & GFC_STD_LEGACY) && !(gfc_option.warn_std & GFC_STD_GNU))) - gfc_errors_to_warnings (1); + gfc_errors_to_warnings (true); if (sym->attr.if_source != IFSRC_IFBODY) gfc_procedure_use (def_sym, actual, where); } done: - gfc_errors_to_warnings (0); + gfc_errors_to_warnings (false); if (gsym->type == GSYM_UNKNOWN) { |