* c-parse.in (yylexstring): Use a location_t.
authorNathan Sidwell <nathan@codesourcery.com>
Sat, 28 Jun 2003 19:05:32 +0000 (19:05 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Sat, 28 Jun 2003 19:05:32 +0000 (19:05 +0000)
From-SVN: r68645

gcc/ChangeLog
gcc/c-parse.in

index 5a31bb03b166fc8603dd2ea9779552a9b8f7d8de..66c027ac8e812a48080dccd02f9b86d61fe5b03f 100644 (file)
@@ -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
index 8ae1e14274ff656c05c0ab22506aa0d407df1a1c..2316ca7dfa394fd242b6aeec55f4ffacc520ba1f 100644 (file)
@@ -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