diff options
author | Robert Moore <Robert.Moore@intel.com> | 2013-05-29 13:14:50 -0700 |
---|---|---|
committer | Robert Moore <Robert.Moore@intel.com> | 2013-05-29 13:14:50 -0700 |
commit | b83eecfa55ebd4d90c80ac000c7bf4e4363a50c2 (patch) | |
tree | 42d5fa1f4c6e30cfe8a7faecd856c7499b028f73 | |
parent | 6ed94cefc65fdd9fe538c77fb3b7d9424aecbe9f (diff) |
iASL: Abort compiler immediately upon a #error directive.
There may not be a standard on this, as some C compilers seem to
abort immediately, others not. For iASL, we will abort
immediately on a #error preprocessor directive.
-rw-r--r-- | source/compiler/prscan.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/compiler/prscan.c b/source/compiler/prscan.c index ab89499a6..639d8453f 100644 --- a/source/compiler/prscan.c +++ b/source/compiler/prscan.c @@ -761,12 +761,15 @@ PrDoDirective ( case PR_DIRECTIVE_ERROR: - /* TBD compiler should abort */ /* Note: No macro expansion */ PrError (ASL_ERROR, ASL_MSG_ERROR_DIRECTIVE, THIS_TOKEN_OFFSET (Token)); - break; + + Gbl_SourceLine = 0; + Gbl_NextError = Gbl_ErrorLog; + CmCleanupAndExit (); + exit(1); case PR_DIRECTIVE_INCLUDE: |