* 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.
+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.
/* 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.
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 */
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;
input_scrub_close (void)
{
input_file_close ();
+ physical_input_line = 0;
+ logical_input_line = -1;
}
char *
/* 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.
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
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);
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);
+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
.*bad-size\.s: Assembler messages:
-.*bad-size\.s:6: Error: .*
+.*bad-size\.s:.* Error: .*
.*bad-size\.s: Assembler messages:
-.*bad-size\.s:6: Warning: .*
+.*bad-size\.s: Warning: .*
.*: Assembler messages:
-.*:8: Error: .*
-.*:8: Error: .*
-.*:8: Error: .*
+.*: Error: .*
+.*: Error: .*
+.*: Error: .*
GAS LISTING .*
.*: 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'