diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2010-04-07 16:54:56 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2010-04-07 16:54:56 -0700 |
commit | a36a4f2f1d24648912553751fae5fb2c7f78f6c8 (patch) | |
tree | 32868cfd09694b9398d5a6ecd3d0f703e26df00b /nasm.c | |
parent | 8adfa7244133b0de70e25d042eb72b6fce436711 (diff) | |
download | nasm-a36a4f2f1d24648912553751fae5fb2c7f78f6c8.tar.gz nasm-a36a4f2f1d24648912553751fae5fb2c7f78f6c8.tar.bz2 nasm-a36a4f2f1d24648912553751fae5fb2c7f78f6c8.zip |
nasm.c: smarter handling of missing directives
If we get D_unknown, we definitely don't need to pass it to the
backend for analysis.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'nasm.c')
-rw-r--r-- | nasm.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -1496,10 +1496,13 @@ static void assemble_file(char *fname, StrList **depend_ptr) } break; default: - if (!d || !ofmt->directive(d, value, pass2)) - nasm_error(pass1 == 1 ? ERR_NONFATAL : ERR_PANIC, - "unrecognised directive [%s]", - directive); + if (ofmt->directive(d, value, pass2)) + break; + /* else fall through */ + case D_unknown: + nasm_error(pass1 == 1 ? ERR_NONFATAL : ERR_PANIC, + "unrecognised directive [%s]", + directive); break; } if (err) { |