diff options
author | Per Bothner <bothner@gcc.gnu.org> | 1996-06-07 00:32:01 -0700 |
---|---|---|
committer | Per Bothner <bothner@gcc.gnu.org> | 1996-06-07 00:32:01 -0700 |
commit | 6c8e6d0c5c8dc5f82bf1e5bcdffd413810cbb52b (patch) | |
tree | 9691aac31fe467402f7c1c34399d4df45188e720 /gcc/cppmain.c | |
parent | c8fb2307d569a7bfe725a238d853c10851bec4dc (diff) | |
download | gcc-6c8e6d0c5c8dc5f82bf1e5bcdffd413810cbb52b.zip gcc-6c8e6d0c5c8dc5f82bf1e5bcdffd413810cbb52b.tar.gz gcc-6c8e6d0c5c8dc5f82bf1e5bcdffd413810cbb52b.tar.bz2 |
cppmain.c (fancy_abort): Only define #ifdef abort.
* cppmain.c (fancy_abort): Only define #ifdef abort.
(main): Make sure cpp_fatal is before exit.
From-SVN: r12209
Diffstat (limited to 'gcc/cppmain.c')
-rw-r--r-- | gcc/cppmain.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/cppmain.c b/gcc/cppmain.c index 50e31be..d818278 100644 --- a/gcc/cppmain.c +++ b/gcc/cppmain.c @@ -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 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; |