testsuite/
* gas/all/byte.s: New.
* gas/all/byte.l: New.
* gas/all/byte.d: New.
* gas/all/gas.exp: Add it.
+
+ * read.c (cons_worker): Detect and reject unexpected string argument.
+
* write.c (fixup_segment): Revert previous delta.
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)
{
+
+ * gas/all/byte.s: New.
+ * gas/all/byte.l: New.
+ * gas/all/byte.d: New.
+ * gas/all/gas.exp: Add it.
+
* gas/arm/weakdef-1.s: New.
--- /dev/null
+#name: bad byte directive
+#error-output: byte.l
--- /dev/null
+[^:]*: Assembler messages:
+[^:]*:1: Error: unexpected `"' in expression
+[^:]*:2: Error: unexpected `"' in expression
--- /dev/null
+ .byte " "
+ .byte " "
run_dump_test relax
}
+run_dump_test byte
+
# .quad is 16 bytes on i960.
if { ![istarget "i960-*-*"] } {
run_dump_test quad