H' hex constants
DJ Delorie
dj@redhat.com
Fri Jul 18 18:20:00 GMT 2008
> > It doesn't gracefully handle syntax errors though (bad),
> > but I suspect it's no worse than the surprise the user gets when they
> > use H'00 without this patch. Perhaps an additional warning for single
> > quotes following symbol chars would be useful?
>
> Yes that might be helpful.
Something like this? No command line option to silence it, but anyone
doing foo'5 should be warned about it ;-)
@@ -1009,6 +1024,14 @@ do_scrub_chars (int (*get) (char *, int)
#ifndef IEEE_STYLE
case LEX_IS_ONECHAR_QUOTE:
+ if (state == 9)
+ {
+ char c;
+
+ c = GET ();
+ as_warn ("'%c found after symbol", c);
+ UNGET (c);
+ }
if (state == 10)
{
/* Preserve the whitespace in foo 'b'. */
More information about the Binutils
mailing list