diff options
Diffstat (limited to 'gcc/f')
-rw-r--r-- | gcc/f/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/f/com.c | 14 | ||||
-rw-r--r-- | gcc/f/lex.c | 10 |
3 files changed, 21 insertions, 12 deletions
diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog index 315640f02be..745890cfdf3 100644 --- a/gcc/f/ChangeLog +++ b/gcc/f/ChangeLog @@ -1,3 +1,12 @@ +Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * com.c (ffecom_init_0): Call fatal_error instead of fatal. + * com.c (init_parse): Call fatal_io_error instead of + pfatal_with_name. + (ffecom_decode_include_option_): Make errors non-fatal. + * lex.c (ffelex_cfelex_, ffelex_get_directive_line_): Likewise. + (ffelex_hash_): Likewise. + Sat Jan 27 20:52:18 2001 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * Make-lang.in: Remove all dependencies on defaults.h. diff --git a/gcc/f/com.c b/gcc/f/com.c index 2fd237ae451..198a1f719d2 100644 --- a/gcc/f/com.c +++ b/gcc/f/com.c @@ -11855,7 +11855,7 @@ ffecom_init_0 () /* Set up pointer types. */ if (ffecom_pointer_kind_ == FFEINFO_basictypeNONE) - fatal ("no INTEGER type can hold a pointer on this configuration"); + fatal_error ("no INTEGER type can hold a pointer on this configuration"); else if (0 && ffe_is_do_internal_checks ()) fprintf (stderr, "Pointer type kt=%d\n", ffecom_pointer_kind_); ffetype_set_kind (ffeinfo_type (FFEINFO_basictypeINTEGER, @@ -14608,7 +14608,7 @@ init_parse (filename) else finput = fopen (filename, "r"); if (finput == 0) - pfatal_with_name (filename); + fatal_io_error ("can't open %s", filename); #ifdef IO_BUFFER_SIZE setvbuf (finput, (char *) xmalloc (IO_BUFFER_SIZE), _IOFBF, IO_BUFFER_SIZE); @@ -16078,12 +16078,12 @@ ffecom_decode_include_option_ (char *spec) dirtmp = (struct file_name_list *) xmalloc (sizeof (struct file_name_list)); dirtmp->next = 0; /* New one goes on the end */ - if (spec[0] != 0) - dirtmp->fname = spec; - else - fatal ("Directory name must immediately follow -I option with no intervening spaces, as in `-Idir', not `-I dir'"); + dirtmp->fname = spec; dirtmp->got_name_map = 0; - append_include_chain (dirtmp, dirtmp); + if (spec[0] == 0) + error ("Directory name must immediately follow -I"); + else + append_include_chain (dirtmp, dirtmp); } return 1; } diff --git a/gcc/f/lex.c b/gcc/f/lex.c index 4c90f267f84..ea0ef059b76 100644 --- a/gcc/f/lex.c +++ b/gcc/f/lex.c @@ -1,5 +1,5 @@ /* Implementation of Fortran lexer - Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 1998, 2001 Free Software Foundation, Inc. Contributed by James Craig Burley. This file is part of GNU Fortran. @@ -803,7 +803,7 @@ ffelex_cfelex_ (ffelexToken *xtoken, FILE *finput, int c) case EOF: case '\n': - fatal ("Badly formed directive -- no closing quote"); + error ("Badly formed directive -- no closing quote"); done = TRUE; break; @@ -1036,7 +1036,7 @@ ffelex_get_directive_line_ (char **text, FILE *finput) || c == EOF) { if (looking_for != 0) - fatal ("Bad directive -- missing close-quote"); + error ("Bad directive -- missing close-quote"); *p++ = '\0'; *text = directive_buffer; @@ -1366,7 +1366,7 @@ ffelex_hash_ (FILE *finput) { lineno = 1; input_filename = old_input_filename; - fatal ("Use `#line ...' instead of `# ...' in first line"); + error ("Use `#line ...' instead of `# ...' in first line"); } if (num == 1) @@ -1410,7 +1410,7 @@ ffelex_hash_ (FILE *finput) { lineno = 1; input_filename = old_input_filename; - fatal ("Use `#line ...' instead of `# ...' in first line"); + error ("Use `#line ...' instead of `# ...' in first line"); } } else |