Commit 57883c53 by Mark Mitchell Committed by Mark Mitchell

toplev.h (struct lang_hooks): Allow decode_option to indicate that…

toplev.h (struct lang_hooks): Allow decode_option to indicate that language-independent processing should not...

	* toplev.h (struct lang_hooks): Allow decode_option to indicate
	that language-independent processing should not be done.
	* toplev.c (main): Adjust accordingly.

	* top.c (ffe_decode_option): Do not permit language-independent
	processing for -ffixed-line-length.

From-SVN: r41427
parent 13c502cd
2001-04-19 Mark Mitchell <mark@codesourcery.com> 2001-04-19 Mark Mitchell <mark@codesourcery.com>
* toplev.h (struct lang_hooks): Allow decode_option to indicate
that language-independent processing should not be done.
* toplev.c (main): Adjust accordingly.
* rtl.texi (jump_insn): Expand on JUMP_LABEL documentation. * rtl.texi (jump_insn): Expand on JUMP_LABEL documentation.
* loop.c (load_mems): Handle a NULL JUMP_LABEL for a JUMP_INSN. * loop.c (load_mems): Handle a NULL JUMP_LABEL for a JUMP_INSN.
......
Thu Apr 19 12:49:24 2001 Mark Mitchell <mark@codesourcery.com>
* top.c (ffe_decode_option): Do not permit language-independent
processing for -ffixed-line-length.
Thu Apr 12 17:57:55 2001 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> Thu Apr 12 17:57:55 2001 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* bad.c (inhibit_warnings): Delete redundant declaration. * bad.c (inhibit_warnings): Delete redundant declaration.
......
/* top.c -- Implementation File (module.c template V1.0) /* top.c -- Implementation File (module.c template V1.0)
Copyright (C) 1995, 1996, 1997, 1999 Free Software Foundation, Inc. Copyright (C) 1995, 1996, 1997, 1999, 2001 Free Software Foundation, Inc.
Contributed by James Craig Burley. Contributed by James Craig Burley.
This file is part of GNU Fortran. This file is part of GNU Fortran.
...@@ -464,9 +464,15 @@ ffe_decode_option (argc, argv) ...@@ -464,9 +464,15 @@ ffe_decode_option (argc, argv)
char *len = &opt[2] + strlen ("fixed-line-length-"); char *len = &opt[2] + strlen ("fixed-line-length-");
if (strcmp (len, "none") == 0) if (strcmp (len, "none") == 0)
{
ffe_set_fixed_line_length (0); ffe_set_fixed_line_length (0);
return -1;
}
else if (ffe_is_digit_string_ (len)) else if (ffe_is_digit_string_ (len))
{
ffe_set_fixed_line_length (atol (len)); ffe_set_fixed_line_length (atol (len));
return -1;
}
else else
return 0; return 0;
} }
......
...@@ -4778,16 +4778,22 @@ toplev_main (argc, argv) ...@@ -4778,16 +4778,22 @@ toplev_main (argc, argv)
/* Perform normal command line switch decoding. */ /* Perform normal command line switch decoding. */
for (i = 1; i < argc;) for (i = 1; i < argc;)
{ {
unsigned int lang_processed; int lang_processed;
unsigned int indep_processed; int indep_processed;
/* Give the language a chance to decode the option for itself. */ /* Give the language a chance to decode the option for itself. */
lang_processed = (*lang_hooks.decode_option) (argc - i, argv + i); lang_processed = (*lang_hooks.decode_option) (argc - i, argv + i);
if (lang_processed >= 0)
/* Now see if the option also has a language independent meaning. /* Now see if the option also has a language independent meaning.
Some options are both language specific and language independent, Some options are both language specific and language independent,
eg --help. */ eg --help. */
indep_processed = independent_decode_option (argc - i, argv + i); indep_processed = independent_decode_option (argc - i, argv + i);
else
{
lang_processed = -lang_processed;
indep_processed = 0;
}
if (lang_processed || indep_processed) if (lang_processed || indep_processed)
i += MAX (lang_processed, indep_processed); i += MAX (lang_processed, indep_processed);
......
...@@ -154,7 +154,12 @@ struct lang_hooks ...@@ -154,7 +154,12 @@ struct lang_hooks
single option (typically starting with -f or -W or +). It should single option (typically starting with -f or -W or +). It should
return the number of command-line arguments it uses if it handles return the number of command-line arguments it uses if it handles
the option, or 0 and not complain if it does not recognise the the option, or 0 and not complain if it does not recognise the
option. This hook cannot be NULL. */ option. If this function returns a negative number, then its
absolute value is the number of command-line arguments used, but,
in addition, no language-independent option processing should be
done for this option.
This hook cannot be NULL. */
int (*decode_option) PARAMS ((int, char **)); int (*decode_option) PARAMS ((int, char **));
/* Called when all command line options have been processed. */ /* Called when all command line options have been processed. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment