mirror of
https://github.com/yasm/yasm
synced 2026-08-26 22:26:05 -04:00
Merge [2323] from trunk (handle and ignore [warning]).
svn path=/branches/yasm-1.0/; revision=2325
This commit is contained in:
commit
23d6207db8
5 changed files with 21 additions and 0 deletions
|
|
@ -339,6 +339,22 @@ parse_line(yasm_parser_nasm *parser_nasm)
|
|||
dirname = DIRECTIVE_NAME_val;
|
||||
get_next_token();
|
||||
|
||||
/* ignore [warning]. TODO: actually implement */
|
||||
if (yasm__strcasecmp(dirname, "warning") == 0) {
|
||||
yasm_warn_set(YASM_WARN_GENERAL,
|
||||
N_("[warning] directive not supported; ignored"));
|
||||
|
||||
/* throw away the rest of the directive tokens */
|
||||
while (!is_eol() && curtok != ']')
|
||||
{
|
||||
destroy_curtok();
|
||||
get_next_token();
|
||||
}
|
||||
expect(']');
|
||||
get_next_token();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (curtok == ']' || curtok == ':')
|
||||
have_vps = 0;
|
||||
else if (!parse_directive_valparams(parser_nasm, &dir_vps)) {
|
||||
|
|
|
|||
|
|
@ -9,6 +9,9 @@ EXTRA_DIST += modules/parsers/nasm/tests/alignnop32.asm
|
|||
EXTRA_DIST += modules/parsers/nasm/tests/alignnop32.hex
|
||||
EXTRA_DIST += modules/parsers/nasm/tests/charconstmath.asm
|
||||
EXTRA_DIST += modules/parsers/nasm/tests/charconstmath.hex
|
||||
EXTRA_DIST += modules/parsers/nasm/tests/dirwarning.asm
|
||||
EXTRA_DIST += modules/parsers/nasm/tests/dirwarning.errwarn
|
||||
EXTRA_DIST += modules/parsers/nasm/tests/dirwarning.hex
|
||||
EXTRA_DIST += modules/parsers/nasm/tests/dy.asm
|
||||
EXTRA_DIST += modules/parsers/nasm/tests/dy.hex
|
||||
EXTRA_DIST += modules/parsers/nasm/tests/endcomma.asm
|
||||
|
|
|
|||
1
modules/parsers/nasm/tests/dirwarning.asm
Normal file
1
modules/parsers/nasm/tests/dirwarning.asm
Normal file
|
|
@ -0,0 +1 @@
|
|||
[warning -w]
|
||||
1
modules/parsers/nasm/tests/dirwarning.errwarn
Normal file
1
modules/parsers/nasm/tests/dirwarning.errwarn
Normal file
|
|
@ -0,0 +1 @@
|
|||
-:1: warning: [warning] directive not supported; ignored
|
||||
0
modules/parsers/nasm/tests/dirwarning.hex
Normal file
0
modules/parsers/nasm/tests/dirwarning.hex
Normal file
Loading…
Add table
Add a link
Reference in a new issue