Merge [2323] from trunk (handle and ignore [warning]).

svn path=/branches/yasm-1.0/; revision=2325
This commit is contained in:
Peter Johnson 2010-05-16 06:30:24 +00:00
commit 23d6207db8
5 changed files with 21 additions and 0 deletions

View file

@ -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)) {

View file

@ -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

View file

@ -0,0 +1 @@
[warning -w]

View file

@ -0,0 +1 @@
-:1: warning: [warning] directive not supported; ignored