summaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcpp')
-rw-r--r--libcpp/ChangeLog6
-rw-r--r--libcpp/lex.c4
2 files changed, 10 insertions, 0 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index b03241bff99..16cf1fc6c04 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -1,3 +1,9 @@
+2006-09-13 Joseph S. Myers <joseph@codesourcery.com>
+
+ PR c/28768
+ PR preprocessor/14634
+ * lex.c (lex_string): Pedwarn for unterminated literals.
+
2006-09-08 Eric Christopher <echristo@apple.com>
* configure.ac: Add 64-bit HWI support for i?86-darwin.
diff --git a/libcpp/lex.c b/libcpp/lex.c
index 6dc0fd9d8df..df09bd6d3d6 100644
--- a/libcpp/lex.c
+++ b/libcpp/lex.c
@@ -646,6 +646,10 @@ lex_string (cpp_reader *pfile, cpp_token *token, const uchar *base)
cpp_error (pfile, CPP_DL_WARNING,
"null character(s) preserved in literal");
+ if (type == CPP_OTHER && CPP_OPTION (pfile, lang) != CLK_ASM)
+ cpp_error (pfile, CPP_DL_PEDWARN, "missing terminating %c character",
+ (int) terminator);
+
pfile->buffer->cur = cur;
create_literal (pfile, token, base, cur - base, type);
}