mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-19 14:34:07 +08:00
* read.c (cons_worker): Detect and reject unexpected string argument.
testsuite/ * gas/all/byte.s: New. * gas/all/byte.l: New. * gas/all/byte.d: New. * gas/all/gas.exp: Add it.
This commit is contained in:
parent
1412f70bc6
commit
847d431180
@ -1,3 +1,7 @@
|
||||
2010-05-05 Julian Brown <julian@codesourcery.com>
|
||||
|
||||
* read.c (cons_worker): Detect and reject unexpected string argument.
|
||||
|
||||
2010-05-04 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* write.c (fixup_segment): Revert previous delta.
|
||||
|
10
gas/read.c
10
gas/read.c
@ -3865,7 +3865,15 @@ cons_worker (int nbytes, /* 1=.byte, 2=.word, 4=.long. */
|
||||
parse_mri_cons (&exp, (unsigned int) nbytes);
|
||||
else
|
||||
#endif
|
||||
TC_PARSE_CONS_EXPRESSION (&exp, (unsigned int) nbytes);
|
||||
{
|
||||
if (*input_line_pointer == '"')
|
||||
{
|
||||
as_bad (_("unexpected `\"' in expression"));
|
||||
ignore_rest_of_line ();
|
||||
return;
|
||||
}
|
||||
TC_PARSE_CONS_EXPRESSION (&exp, (unsigned int) nbytes);
|
||||
}
|
||||
|
||||
if (rva)
|
||||
{
|
||||
|
@ -1,3 +1,10 @@
|
||||
2010-05-05 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* gas/all/byte.s: New.
|
||||
* gas/all/byte.l: New.
|
||||
* gas/all/byte.d: New.
|
||||
* gas/all/gas.exp: Add it.
|
||||
|
||||
2010-04-29 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* gas/arm/weakdef-1.s: New.
|
||||
|
2
gas/testsuite/gas/all/byte.d
Normal file
2
gas/testsuite/gas/all/byte.d
Normal file
@ -0,0 +1,2 @@
|
||||
#name: bad byte directive
|
||||
#error-output: byte.l
|
3
gas/testsuite/gas/all/byte.l
Normal file
3
gas/testsuite/gas/all/byte.l
Normal file
@ -0,0 +1,3 @@
|
||||
[^:]*: Assembler messages:
|
||||
[^:]*:1: Error: unexpected `"' in expression
|
||||
[^:]*:2: Error: unexpected `"' in expression
|
2
gas/testsuite/gas/all/byte.s
Normal file
2
gas/testsuite/gas/all/byte.s
Normal file
@ -0,0 +1,2 @@
|
||||
.byte " "
|
||||
.byte " "
|
@ -329,6 +329,8 @@ if { ![istarget "tic4x*-*-*"] && ![istarget "tic54x*-*-*"] && ![istarget "hppa*-
|
||||
run_dump_test relax
|
||||
}
|
||||
|
||||
run_dump_test byte
|
||||
|
||||
# .quad is 16 bytes on i960.
|
||||
if { ![istarget "i960-*-*"] } {
|
||||
run_dump_test quad
|
||||
|
Loading…
Reference in New Issue
Block a user