Use EXIT_FAILURE and EXIT_SUCCESS rather than 1 and 0.
reader ();
timevar_pop (TV_READER);
- if (complain_message_count)
- exit (1);
+ if (complaint_issued)
+ exit (EXIT_FAILURE);
/* Find useless nonterminals and productions and reduce the grammar. */
timevar_push (TV_REDUCE);
/* Stop if there were errors, to avoid trashing previous output
files. */
- if (complain_message_count)
- exit (1);
+ if (complaint_issued)
+ exit (EXIT_FAILURE);
/* Lookaheads are no longer needed. */
timevar_push (TV_FREE);
timevar_stop (TV_TOTAL);
timevar_print (stderr);
- return complain_message_count ? EXIT_FAILURE : EXIT_SUCCESS;
+ /* Some ancient SunOS versions exit (0) if main returns, so use
+ `exit' to exit with nonzero status. */
+ if (complaint_issued)
+ exit (EXIT_FAILURE);
+
+ return EXIT_SUCCESS;
}