aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Changelog4
-rw-r--r--cparser/Lexer.mll2
2 files changed, 5 insertions, 1 deletions
diff --git a/Changelog b/Changelog
index baa2b8a2..5bf091ec 100644
--- a/Changelog
+++ b/Changelog
@@ -1,3 +1,7 @@
+- In string and character literals, treat illegal escape sequences
+ (e.g. "\%" or "\0") as an error instead of a warning.
+
+
Release 2.4, 2014-09-17
=======================
diff --git a/cparser/Lexer.mll b/cparser/Lexer.mll
index 276aead2..53a27d81 100644
--- a/cparser/Lexer.mll
+++ b/cparser/Lexer.mll
@@ -356,7 +356,7 @@ and char = parse
| simple_escape_sequence
{ convert_escape c }
| '\\' (_ as c)
- { warning lexbuf "incorrect escape sequence '\\%c', treating as '%c'" c c;
+ { error lexbuf "incorrect escape sequence '\\%c'" c;
Int64.of_int (Char.code c) }
| _ as c
{ Int64.of_int (Char.code c) }