aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2003-06-28 19:05:32 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2003-06-28 19:05:32 +0000
commitcead95c2411baa6f3601d9c3e5c349aa369e52cd (patch)
tree2ca5ff4f74fb918a95afb926bab36463201b4722 /gcc
parent357734719bc1f42da202c8d0e28a80f4a87e682b (diff)
downloadgcc-cead95c2411baa6f3601d9c3e5c349aa369e52cd.zip
gcc-cead95c2411baa6f3601d9c3e5c349aa369e52cd.tar.gz
gcc-cead95c2411baa6f3601d9c3e5c349aa369e52cd.tar.bz2
* c-parse.in (yylexstring): Use a location_t.
From-SVN: r68645
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog2
-rw-r--r--gcc/c-parse.in11
2 files changed, 7 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5a31bb0..66c027a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,7 @@
2003-06-28 Nathan Sidwell <nathan@codesourcery.com>
+ * c-parse.in (yylexstring): Use a location_t.
+
* diagnostic.h (diagnostic_set_info): Replace file and lineno
parameters with a location_t.
* diagnostic.c (diagnostic_set_info): Replace file and lineno
diff --git a/gcc/c-parse.in b/gcc/c-parse.in
index 8ae1e14..2316ca7 100644
--- a/gcc/c-parse.in
+++ b/gcc/c-parse.in
@@ -3688,15 +3688,14 @@ yylexstring ()
varray_type strings;
ifc
- static int last_lineno = 0;
- static const char *last_input_filename = 0;
+ static location_t last_location;
if (warn_traditional && !in_system_header
- && (input_line != last_lineno || !last_input_filename ||
- strcmp (last_input_filename, input_filename)))
+ && (input_location.line != last_location.line
+ || !last_location.file ||
+ strcmp (last_location.file, input_location.file)))
{
warning ("traditional C rejects string concatenation");
- last_lineno = input_line;
- last_input_filename = input_filename;
+ last_location = input_location;
}
end ifc