dump-parse-tree.c: Use fprintf, fputs and fputc instead of gfc_status and gfc_status_char.
* dump-parse-tree.c: Use fprintf, fputs and fputc instead of gfc_status and gfc_status_char. Remove gfc_ prefix of the gfc_show_* functions and make them static. Add new gfc_dump_parse_tree function. * gfortran.h (gfc_option_t): Rename verbose into dump_parse_tree. (gfc_status, gfc_status_char): Delete prototypes. * error.c (gfc_status, gfc_status_char): Remove functions. * scanner.c (gfc_new_file): Use printf instead of gfc_status. * options.c (gfc_init_options): Rename verbose into dump_parse_tree. (gfc_handle_module_path_options): Use gfc_fatal_error instead of gfc_status and exit. (gfc_handle_option): Rename verbose into dump_parse_tree. From-SVN: r133958
This commit is contained in:
parent
1bde5bc468
commit
6c1abb5c58
@ -1,3 +1,18 @@
|
||||
2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
||||
|
||||
* dump-parse-tree.c: Use fprintf, fputs and fputc instead of
|
||||
gfc_status and gfc_status_char. Remove gfc_ prefix of the gfc_show_*
|
||||
functions and make them static. Add new gfc_dump_parse_tree
|
||||
function.
|
||||
* gfortran.h (gfc_option_t): Rename verbose into dump_parse_tree.
|
||||
(gfc_status, gfc_status_char): Delete prototypes.
|
||||
* error.c (gfc_status, gfc_status_char): Remove functions.
|
||||
* scanner.c (gfc_new_file): Use printf instead of gfc_status.
|
||||
* options.c (gfc_init_options): Rename verbose into dump_parse_tree.
|
||||
(gfc_handle_module_path_options): Use gfc_fatal_error instead of
|
||||
gfc_status and exit.
|
||||
(gfc_handle_option): Rename verbose into dump_parse_tree.
|
||||
|
||||
2008-04-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
||||
|
||||
@ -49,7 +64,7 @@
|
||||
|
||||
2008-04-03 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
* f95-lang.c (insert_block): Kill.
|
||||
* f95-lang.c (insert_block): Kill.
|
||||
|
||||
2008-04-01 George Helffrich <george@gcc.gnu.org>
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -963,31 +963,6 @@ gfc_free_error (gfc_error_buf *err)
|
||||
}
|
||||
|
||||
|
||||
/* Debug wrapper for printf. */
|
||||
|
||||
void
|
||||
gfc_status (const char *cmsgid, ...)
|
||||
{
|
||||
va_list argp;
|
||||
|
||||
va_start (argp, cmsgid);
|
||||
|
||||
vprintf (_(cmsgid), argp);
|
||||
|
||||
va_end (argp);
|
||||
}
|
||||
|
||||
|
||||
/* Subroutine for outputting a single char so that we don't have to go
|
||||
around creating a lot of 1-character strings. */
|
||||
|
||||
void
|
||||
gfc_status_char (char c)
|
||||
{
|
||||
putchar (c);
|
||||
}
|
||||
|
||||
|
||||
/* Report the number of warnings and errors that occurred to the caller. */
|
||||
|
||||
void
|
||||
|
@ -1818,7 +1818,7 @@ typedef struct
|
||||
int max_continue_fixed;
|
||||
int max_continue_free;
|
||||
int max_identifier_length;
|
||||
int verbose;
|
||||
int dump_parse_tree;
|
||||
|
||||
int warn_aliasing;
|
||||
int warn_ampersand;
|
||||
@ -2012,9 +2012,6 @@ void gfc_push_error (gfc_error_buf *);
|
||||
void gfc_pop_error (gfc_error_buf *);
|
||||
void gfc_free_error (gfc_error_buf *);
|
||||
|
||||
void gfc_status (const char *, ...) ATTRIBUTE_PRINTF_1;
|
||||
void gfc_status_char (char);
|
||||
|
||||
void gfc_get_errors (int *, int *);
|
||||
|
||||
/* arith.c */
|
||||
@ -2360,22 +2357,7 @@ void gfc_insert_bbt (void *, void *, compare_fn);
|
||||
void gfc_delete_bbt (void *, void *, compare_fn);
|
||||
|
||||
/* dump-parse-tree.c */
|
||||
void gfc_show_actual_arglist (gfc_actual_arglist *);
|
||||
void gfc_show_array_ref (gfc_array_ref *);
|
||||
void gfc_show_array_spec (gfc_array_spec *);
|
||||
void gfc_show_attr (symbol_attribute *);
|
||||
void gfc_show_code (int, gfc_code *);
|
||||
void gfc_show_components (gfc_symbol *);
|
||||
void gfc_show_constructor (gfc_constructor *);
|
||||
void gfc_show_equiv (gfc_equiv *);
|
||||
void gfc_show_expr (gfc_expr *);
|
||||
void gfc_show_expr_n (const char *, gfc_expr *);
|
||||
void gfc_show_namelist (gfc_namelist *);
|
||||
void gfc_show_namespace (gfc_namespace *);
|
||||
void gfc_show_ref (gfc_ref *);
|
||||
void gfc_show_symbol (gfc_symbol *);
|
||||
void gfc_show_symbol_n (const char *, gfc_symbol *);
|
||||
void gfc_show_typespec (gfc_typespec *);
|
||||
void gfc_dump_parse_tree (gfc_namespace *, FILE *);
|
||||
|
||||
/* parse.c */
|
||||
try gfc_parse_file (void);
|
||||
|
@ -64,7 +64,7 @@ gfc_init_options (unsigned int argc ATTRIBUTE_UNUSED,
|
||||
gfc_option.max_subrecord_length = 0;
|
||||
gfc_option.convert = GFC_CONVERT_NATIVE;
|
||||
gfc_option.record_marker = 0;
|
||||
gfc_option.verbose = 0;
|
||||
gfc_option.dump_parse_tree = 0;
|
||||
|
||||
gfc_option.warn_aliasing = 0;
|
||||
gfc_option.warn_ampersand = 0;
|
||||
@ -391,16 +391,10 @@ gfc_handle_module_path_options (const char *arg)
|
||||
{
|
||||
|
||||
if (gfc_option.module_dir != NULL)
|
||||
{
|
||||
gfc_status ("gfortran: Only one -M option allowed\n");
|
||||
exit (3);
|
||||
}
|
||||
gfc_fatal_error ("gfortran: Only one -M option allowed");
|
||||
|
||||
if (arg == NULL)
|
||||
{
|
||||
gfc_status ("gfortran: Directory required after -M\n");
|
||||
exit (3);
|
||||
}
|
||||
gfc_fatal_error ("gfortran: Directory required after -M");
|
||||
|
||||
gfc_option.module_dir = (char *) gfc_getmem (strlen (arg) + 2);
|
||||
strcpy (gfc_option.module_dir, arg);
|
||||
@ -564,7 +558,7 @@ gfc_handle_option (size_t scode, const char *arg, int value)
|
||||
break;
|
||||
|
||||
case OPT_fdump_parse_tree:
|
||||
gfc_option.verbose = value;
|
||||
gfc_option.dump_parse_tree = value;
|
||||
break;
|
||||
|
||||
case OPT_ffixed_form:
|
||||
|
@ -1684,10 +1684,8 @@ gfc_new_file (void)
|
||||
|
||||
#if 0 /* Debugging aid. */
|
||||
for (; line_head; line_head = line_head->next)
|
||||
gfc_status ("%s:%3d %s\n",
|
||||
LOCATION_FILE (line_head->location),
|
||||
LOCATION_LINE (line_head->location),
|
||||
line_head->line);
|
||||
printf ("%s:%3d %s\n", LOCATION_FILE (line_head->location),
|
||||
LOCATION_LINE (line_head->location), line_head->line);
|
||||
|
||||
exit (0);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user