From d8b77462d4f5f8a5dde591e1282c092d31659a51 Mon Sep 17 00:00:00 2001 From: hainque Date: Thu, 6 Jul 2017 15:04:30 +0000 Subject: 2017-07-06 Olivier Hainque * gcc.c (spec_undefvar_allowed): New global. (process_command): Set to true when running for --version or --help alone, or together. (getenv_spec_function): When the variable is not defined, use the variable name as the variable value if we're allowed not to issue a fatal error. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250027 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/gcc.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'gcc/gcc.c') diff --git a/gcc/gcc.c b/gcc/gcc.c index 6d724b25423..e8e3d6687c3 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -4615,23 +4615,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; -- cgit v1.2.1 From 2516d46462d059acbd8810df495a21e73ab073f1 Mon Sep 17 00:00:00 2001 From: marxin Date: Fri, 14 Jul 2017 07:05:27 +0000 Subject: Remove Pascal language in source code. 2017-07-14 Martin Liska * dbxout.c (get_lang_number): Do not handle GNU Pascal. * dbxout.h (extern void dbxout_stab_value_internal_label_diff): Remove N_SO_PASCAL. * dwarf2out.c (lower_bound_default): Do not handle DW_LANG_Pascal83. (gen_compile_unit_die): Likewise. * gcc.c: Remove default extension binding for GNU Pascal. * stmt.c: Remove Pascal language from a comment. * xcoffout.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250197 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/gcc.c | 1 - 1 file changed, 1 deletion(-) (limited to 'gcc/gcc.c') diff --git a/gcc/gcc.c b/gcc/gcc.c index e8e3d6687c3..f19799382b7 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -1305,7 +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}, -- cgit v1.2.1 From 61b3ef70d2921130ef52337e3a8358e28f9b5f21 Mon Sep 17 00:00:00 2001 From: marxin Date: Fri, 14 Jul 2017 07:44:33 +0000 Subject: Remove Java references in source code. 2017-07-14 Martin Liska * cfgexpand.c (expand_gimple_basic_block): Remove dead comment. * dwarf2out.c (is_java): Remove the function. (output_pubname): Remove usage of the function. (lower_bound_default): Remove usage of DW_LANG_Java. (gen_compile_unit_die): Likewise. * gcc.c: Remove compiler defaults for .java and .zip files. * gimple-expr.c (remove_suffix): Change as there's no longer extension than 4-letter one. * gimplify.c (mostly_copy_tree_r): Remove Java-special part. (gimplify_save_expr): Likewise. * ipa-utils.h (polymorphic_type_binfo_p): Remove the comment as it's possible even for other languages than Java. * langhooks.h (struct lang_hooks): Remove Java from a comment. * lto-opts.c (lto_write_options): Remove reference to Java. * opts.c (strip_off_ending): Update file extension handling. * tree-cfg.c (verify_gimple_call): Remove comment with Java. * tree-eh.c (lower_resx): Likewise. * tree.c (free_lang_data_in_type): Remove dead code. (find_decls_types_r): Likewise. (build_common_builtin_nodes): Remove Java from a comment. (verify_type): Remove dead code. * varasm.c (assemble_external): Remove Java from a comment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250199 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/gcc.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'gcc/gcc.c') diff --git a/gcc/gcc.c b/gcc/gcc.c index f19799382b7..d8c5260e36b 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -1305,8 +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}, - {".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}, -- cgit v1.2.1