diff options
author | Joseph Myers <jsm28@cam.ac.uk> | 2002-01-08 10:00:27 +0000 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2002-01-08 10:00:27 +0000 |
commit | 3f595aa14ce1e5d7dc853fdb97dfae852849d939 (patch) | |
tree | 2bef32e66b7ac67a4758606fb3fcb9b477684be4 /gcc/gcc.c | |
parent | 5bc5a8f9b7f14fdaf530000984a8eb30a0804b32 (diff) | |
download | gcc-3f595aa14ce1e5d7dc853fdb97dfae852849d939.tar.gz |
re PR other/704 (--help and --version)
* gcc.c (option_map): Remove --version.
(process_command): Handle -fversion following the GNU Coding
Standards. Partially addresses PR other/704.
f:
* g77spec.c (lookup_option): Handle -fversion.
(lang_specific_driver): Update copyright date in --version output.
From-SVN: r48631
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r-- | gcc/gcc.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c index bb2b0c42a8e..d5472d33ddf 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -982,7 +982,6 @@ static const struct option_map option_map[] = {"--use-version", "-V", "a"}, {"--user-dependencies", "-MM", 0}, {"--verbose", "-v", 0}, - {"--version", "-dumpversion", 0}, {"--warn-", "-W", "*j"}, {"--write-dependencies", "-MD", 0}, {"--write-user-dependencies", "-MMD", 0}, @@ -3350,6 +3349,17 @@ process_command (argc, argv) printf ("%s\n", spec_machine); exit (0); } + else if (strcmp (argv[i], "-fversion") == 0) + { + /* translate_options () has turned --version into -fversion. */ + printf (_("%s (GCC) %s\n"), programname, version_string); + fputs (_("Copyright (C) 2002 Free Software Foundation, Inc.\n"), + stdout); + fputs (_("This is free software; see the source for copying conditions. There is NO\n\ +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"), + stdout); + exit (0); + } else if (strcmp (argv[i], "-fhelp") == 0) { /* translate_options () has turned --help into -fhelp. */ |