summaryrefslogtreecommitdiff
path: root/gcc/gcc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r--gcc/gcc.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 6d724b25423..d8c5260e36b 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -1305,9 +1305,6 @@ static const struct compiler default_compilers[] =
{".f03", "#Fortran", 0, 0, 0}, {".F03", "#Fortran", 0, 0, 0},
{".f08", "#Fortran", 0, 0, 0}, {".F08", "#Fortran", 0, 0, 0},
{".r", "#Ratfor", 0, 0, 0},
- {".p", "#Pascal", 0, 0, 0}, {".pas", "#Pascal", 0, 0, 0},
- {".java", "#Java", 0, 0, 0}, {".class", "#Java", 0, 0, 0},
- {".zip", "#Java", 0, 0, 0}, {".jar", "#Java", 0, 0, 0},
{".go", "#Go", 0, 1, 0},
/* Next come the entries for C. */
{".c", "@c", 0, 0, 1},
@@ -4615,23 +4612,23 @@ process_command (unsigned int decoded_options_count,
/* Decide if undefined variable references are allowed in specs. */
- /* --version and --help alone or together are safe. Note that -v would
- make them unsafe, as they'd then be run for subprocesses as well, the
- location of which might depend on variables possibly coming from
- self-specs.
+ /* -v alone is safe. --version and --help alone or together are safe. Note
+ that -v would make them unsafe, as they'd then be run for subprocesses as
+ well, the location of which might depend on variables possibly coming
+ from self-specs. Note also that the command name is counted in
+ decoded_options_count. */
- Count the number of options we have for which undefined variables
- are harmless for sure, and check that nothing else is set. */
-
- unsigned n_varsafe_options = 0;
+ unsigned help_version_count = 0;
if (print_version)
- n_varsafe_options++;
-
+ help_version_count++;
+
if (print_help_list)
- n_varsafe_options++;
-
- spec_undefvar_allowed = (n_varsafe_options == decoded_options_count - 1);
+ help_version_count++;
+
+ spec_undefvar_allowed =
+ ((verbose_flag && decoded_options_count == 2)
+ || help_version_count == decoded_options_count - 1);
alloc_switch ();
switches[n_switches].part1 = 0;