X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/7da99edea76d6148c776214a71bc09dacfc0cb7b..a12f5cabb2dd5a4a1ab4010f0ddbd90179df9f6c:/src/main.c diff --git a/src/main.c b/src/main.c index 674c56d5..80704466 100644 --- a/src/main.c +++ b/src/main.c @@ -119,7 +119,13 @@ main (int argc, char *argv[]) output_files (); - exit (complain_message_count ? 1 : 0); + /* If using alloca.c, flush the alloca'ed memory for the benefit of + people running Bison as a library in IDEs. */ +#if C_ALLOCA + alloca (0); +#endif + + return complain_message_count ? EXIT_FAILURE : EXIT_SUCCESS; } /* Abort for an internal error denoted by string S. */