diff options
author | Alan Modra <amodra@gmail.com> | 2011-03-18 11:16:28 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2011-03-18 11:16:28 +0000 |
commit | 144886fa6bdc77ca109153ea4a58e886a36ffff2 (patch) | |
tree | e4cefb8675da050351bca2ce8b88235d0194b9d3 /gas/messages.c | |
parent | 04648e6590b87d680db3ccd1b5cc5d38e57c1862 (diff) | |
download | gdb-144886fa6bdc77ca109153ea4a58e886a36ffff2.zip gdb-144886fa6bdc77ca109153ea4a58e886a36ffff2.tar.gz gdb-144886fa6bdc77ca109153ea4a58e886a36ffff2.tar.bz2 |
gas/
* input-scrub.c (line_numberT): Delete.
(input_scrub_close): Reset line counters.
* messages.c (as_show_where): Don't print invalid line number.
(as_warn_internal, as_bad_internal): Likewise.
gas/testsuite/
* gas/elf/bad-size.err: Adjust expected error.
* gas/i386/bad-size.warn: Likewise.
* gas/i386/inval-equ-2.l: Likewise.
* gas/symver/symver2.l: Likewise.
Diffstat (limited to 'gas/messages.c')
-rw-r--r-- | gas/messages.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/gas/messages.c b/gas/messages.c index 9ea1bce..e1734f2 100644 --- a/gas/messages.c +++ b/gas/messages.c @@ -1,6 +1,6 @@ /* messages.c - error reporter - Copyright 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001, - 2003, 2004, 2005, 2006, 2007, 2008 + 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -113,7 +113,12 @@ as_show_where (void) as_where (&file, &line); identify (file); if (file) - fprintf (stderr, "%s:%u: ", file, line); + { + if (line != 0) + fprintf (stderr, "%s:%u: ", file, line); + else + fprintf (stderr, "%s: ", file); + } } /* Send to stderr a string as a warning, and locate warning @@ -146,7 +151,12 @@ as_warn_internal (char *file, unsigned int line, char *buffer) identify (file); if (file) - fprintf (stderr, "%s:%u: ", file, line); + { + if (line != 0) + fprintf (stderr, "%s:%u: ", file, line); + else + fprintf (stderr, "%s: ", file); + } fprintf (stderr, _("Warning: ")); fputs (buffer, stderr); (void) putc ('\n', stderr); @@ -207,7 +217,12 @@ as_bad_internal (char *file, unsigned int line, char *buffer) identify (file); if (file) - fprintf (stderr, "%s:%u: ", file, line); + { + if (line != 0) + fprintf (stderr, "%s:%u: ", file, line); + else + fprintf (stderr, "%s: ", file); + } fprintf (stderr, _("Error: ")); fputs (buffer, stderr); (void) putc ('\n', stderr); |