cppmain.c (fancy_abort): Only define #ifdef abort.
authorPer Bothner <bothner@gcc.gnu.org>
Fri, 7 Jun 1996 07:32:01 +0000 (00:32 -0700)
committerPer Bothner <bothner@gcc.gnu.org>
Fri, 7 Jun 1996 07:32:01 +0000 (00:32 -0700)
* cppmain.c (fancy_abort):  Only define #ifdef abort.
(main):  Make sure cpp_fatal is before exit.

From-SVN: r12209

gcc/cppmain.c

index 50e31be..d818278 100644 (file)
@@ -34,6 +34,7 @@ char *progname;
 cpp_reader parse_in;
 cpp_options options;
 
+#ifdef abort
 /* More 'friendly' abort that prints the line and file.
    config.h can #define abort fancy_abort if you like that sort of thing.  */
 
@@ -42,6 +43,7 @@ fancy_abort ()
 {
   fatal ("Internal gcc abort.");
 }
+#endif
 
 \f
 int
@@ -64,10 +66,10 @@ main (argc, argv)
   cpp_options_init (opts);
   
   argi += cpp_handle_options (&parse_in, argc - argi , argv + argi);
+  if (argi < argc && ! CPP_FATAL_ERRORS (&parse_in))
+    cpp_fatal (&parse_in, "Invalid option `%s'", argv[argi]);
   if (CPP_FATAL_ERRORS (&parse_in))
     exit (FATAL_EXIT_CODE);
-  if (argi < argc)
-    cpp_fatal (&parse_in, "Invalid option `%s'", argv[argi]);
       
   parse_in.show_column = 1;