aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2011-03-18 11:16:28 +0000
committerAlan Modra <amodra@gmail.com>2011-03-18 11:16:28 +0000
commit144886fa6bdc77ca109153ea4a58e886a36ffff2 (patch)
treee4cefb8675da050351bca2ce8b88235d0194b9d3
parent04648e6590b87d680db3ccd1b5cc5d38e57c1862 (diff)
downloadgdb-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.
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/input-scrub.c11
-rw-r--r--gas/messages.c23
-rw-r--r--gas/testsuite/ChangeLog7
-rw-r--r--gas/testsuite/gas/elf/bad-size.err2
-rw-r--r--gas/testsuite/gas/i386/bad-size.warn2
-rw-r--r--gas/testsuite/gas/i386/inval-equ-2.l6
-rw-r--r--gas/testsuite/gas/symver/symver2.l2
8 files changed, 45 insertions, 15 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index db6499d..9f65957 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,12 @@
2011-03-18 Alan Modra <amodra@gmail.com>
+ * 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.
+
+2011-03-18 Alan Modra <amodra@gmail.com>
+
* read.c (read_a_source_file): Remove md_after_pass_hook.
Move "quit" label before set of dot_symbol.
* config/tc-d10v.h (md_after_pass_hook): Don't define.
diff --git a/gas/input-scrub.c b/gas/input-scrub.c
index d616f63..c6169b3 100644
--- a/gas/input-scrub.c
+++ b/gas/input-scrub.c
@@ -1,6 +1,6 @@
/* input_scrub.c - Break up input buffers into whole numbers of lines.
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 2000, 2001, 2003, 2005, 2006, 2007, 2008
+ 2000, 2001, 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -100,10 +100,9 @@ int macro_nest;
static char *physical_input_file;
static char *logical_input_file;
-typedef unsigned int line_numberT; /* 1-origin line number in a source file. */
+/* 1-origin line number in a source file. */
/* A line ends in '\n' or eof. */
-
-static line_numberT physical_input_line;
+static unsigned int physical_input_line;
static int logical_input_line;
/* Struct used to save the state of the input handler during include files */
@@ -115,7 +114,7 @@ struct input_save {
unsigned int buffer_length;
char * physical_input_file;
char * logical_input_file;
- line_numberT physical_input_line;
+ unsigned int physical_input_line;
int logical_input_line;
int sb_index;
sb from_sb;
@@ -304,6 +303,8 @@ void
input_scrub_close (void)
{
input_file_close ();
+ physical_input_line = 0;
+ logical_input_line = -1;
}
char *
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);
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 155f1a9..352966d 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2011-03-18 Alan Modra <amodra@gmail.com>
+
+ * 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.
+
2011-03-17 H.J. Lu <hongjiu.lu@intel.com>
PR gas/12589
diff --git a/gas/testsuite/gas/elf/bad-size.err b/gas/testsuite/gas/elf/bad-size.err
index 5e01ef2..caa6bae 100644
--- a/gas/testsuite/gas/elf/bad-size.err
+++ b/gas/testsuite/gas/elf/bad-size.err
@@ -1,2 +1,2 @@
.*bad-size\.s: Assembler messages:
-.*bad-size\.s:6: Error: .*
+.*bad-size\.s:.* Error: .*
diff --git a/gas/testsuite/gas/i386/bad-size.warn b/gas/testsuite/gas/i386/bad-size.warn
index 149b3c0..71f6241 100644
--- a/gas/testsuite/gas/i386/bad-size.warn
+++ b/gas/testsuite/gas/i386/bad-size.warn
@@ -1,2 +1,2 @@
.*bad-size\.s: Assembler messages:
-.*bad-size\.s:6: Warning: .*
+.*bad-size\.s: Warning: .*
diff --git a/gas/testsuite/gas/i386/inval-equ-2.l b/gas/testsuite/gas/i386/inval-equ-2.l
index d598d0b..aed89b4 100644
--- a/gas/testsuite/gas/i386/inval-equ-2.l
+++ b/gas/testsuite/gas/i386/inval-equ-2.l
@@ -1,7 +1,7 @@
.*: Assembler messages:
-.*:8: Error: .*
-.*:8: Error: .*
-.*:8: Error: .*
+.*: Error: .*
+.*: Error: .*
+.*: Error: .*
GAS LISTING .*
diff --git a/gas/testsuite/gas/symver/symver2.l b/gas/testsuite/gas/symver/symver2.l
index 216b487..f9d73d7 100644
--- a/gas/testsuite/gas/symver/symver2.l
+++ b/gas/testsuite/gas/symver/symver2.l
@@ -1,2 +1,2 @@
.*: Assembler messages:
-.*:8: Error: invalid attempt to declare external version name as default in symbol `foo@@version1'
+.*: Error: invalid attempt to declare external version name as default in symbol `foo@@version1'