summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cil.patch/clexer.mll.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/cil.patch/clexer.mll.patch b/cil.patch/clexer.mll.patch
new file mode 100644
index 0000000..edbe8be
--- /dev/null
+++ b/cil.patch/clexer.mll.patch
@@ -0,0 +1,24 @@
+*** ../cil.orig/src/frontc/clexer.mll 2006-05-21 06:14:15.000000000 +0200
+--- ../cil/src/frontc/clexer.mll 2009-03-29 10:34:34.000000000 +0200
+***************
+*** 584,590 ****
+ | blank { hash lexbuf}
+ | intnum { (* We are seeing a line number. This is the number for the
+ * next line *)
+! E.setCurrentLine (int_of_string (Lexing.lexeme lexbuf) - 1);
+ (* A file name must follow *)
+ file lexbuf }
+ | "line" { hash lexbuf } (* MSVC line number info *)
+--- 584,595 ----
+ | blank { hash lexbuf}
+ | intnum { (* We are seeing a line number. This is the number for the
+ * next line *)
+! let s = Lexing.lexeme lexbuf in
+! begin try
+! E.setCurrentLine (int_of_string s - 1)
+! with Failure _ ->
+! E.warn "Bad line number in preprocessed file: %s" s
+! end;
+ (* A file name must follow *)
+ file lexbuf }
+ | "line" { hash lexbuf } (* MSVC line number info *)