]> gcc.gnu.org Git - gcc.git/commitdiff
Fix command line parsing to report unrecognised options.
authorNick Clifton <nickc@cygnus.com>
Thu, 18 Nov 1999 11:01:34 +0000 (11:01 +0000)
committerNick Clifton <nickc@gcc.gnu.org>
Thu, 18 Nov 1999 11:01:34 +0000 (11:01 +0000)
From-SVN: r30574

gcc/ChangeLog
gcc/cppinit.c
gcc/toplev.c

index 692e26378cc1dbd429974aa6b81761a7ebb9a533..52af71432a60899bfc97b98f34b64a137353a1e6 100644 (file)
@@ -1,3 +1,10 @@
+1999-11-18  Nick Clifton  <nickc@cygnus.com>
+
+       * toplev.c (main): Correctly detect an unrecognised option.
+
+       * cppinit.c (cpp_handle_option): Do not claim to have consumed
+       a -f option if it has not been recognised.
+
 Thu Nov 18 00:59:11 1999  Michael Gschwind  <mikeg@alagoas.watson.ibm.com>
 
        * basic-block.h (update_life_extent): Remove trailing comma on
index 691e1b0d4c408053086ec8a916b1ae23f0f5b0ab..15c7938831e4690cdb8563f658005ad44c9676ec 100644 (file)
@@ -1105,6 +1105,10 @@ cpp_handle_option (pfile, argc, argv)
          opts->preprocessed = 1;
        else if (!strcmp (argv[i], "-fno-preprocessed"))
          opts->preprocessed = 0;
+       else
+         {
+           return i;
+         }
        break;
 
       case 'I':                        /* Add directory to path for includes.  */
index 19d30917f35bac0e121e1ed6a1e7626bef13481a..20ce927dc0d70dc57334f93a68bc07544581a95b 100644 (file)
@@ -5459,7 +5459,7 @@ main (argc, argv)
                break;
            }
 
-         if (option)
+         if (j != NUM_ELEM (documented_lang_options))
            {
              if (extra_warnings)
                {
This page took 0.079682 seconds and 5 git commands to generate.