diff options
author | Jakub Jelinek <jakub@redhat.com> | 2005-07-14 12:12:17 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2005-07-14 12:12:17 +0200 |
commit | d71b89ca60e6546aaef903c22c6459b592f934d4 (patch) | |
tree | c2963bb336cabb4f3f780c2faf9a7041c131dbc1 /gcc/fortran/match.c | |
parent | cb1119b785be0b910b6c7a9e2ee1f0338badf579 (diff) | |
download | gcc-d71b89ca60e6546aaef903c22c6459b592f934d4.zip gcc-d71b89ca60e6546aaef903c22c6459b592f934d4.tar.gz gcc-d71b89ca60e6546aaef903c22c6459b592f934d4.tar.bz2 |
gfortran.h (MAX_ERROR_MESSAGE): Remove.
* gfortran.h (MAX_ERROR_MESSAGE): Remove.
(gfc_error_buf): Add allocated and index fields. Change message
field from array to a pointer.
* error.c (use_warning_buffer, error_ptr, warning_ptr): Remove.
(cur_error_buffer): New variable.
(error_char): Use cur_error_buffer->{message,index} instead of
{warning,error}_{buffer.message,ptr}. Reallocate message buffer
if too small.
(gfc_warning, gfc_notify_std, gfc_error, gfc_error_now): Setup
cur_error_buffer and its index rather than {warning,error}_ptr
and use_warning_buffer.
(gfc_warning_check, gfc_error_check): Don't print anything if
message is NULL.
(gfc_push_error): Allocate saved message with xstrdup.
(gfc_pop_error): Free saved message with gfc_free.
(gfc_free_error): New function.
* primary.c (match_complex_constant): Call gfc_free_error if
gfc_pop_error will not be called.
* match.c (gfc_match_st_function): Likewise.
* gfortran.dg/g77/cpp6.f: New test.
From-SVN: r102015
Diffstat (limited to 'gcc/fortran/match.c')
-rw-r--r-- | gcc/fortran/match.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index f63eaf6..7f249ee 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -2650,6 +2650,8 @@ gfc_match_st_function (void) m = gfc_match (" = %e%t", &expr); if (m == MATCH_NO) goto undo_error; + + gfc_free_error (&old_error); if (m == MATCH_ERROR) return m; |