diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-09-13 01:04:18 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-09-13 01:04:18 +0000 |
commit | 0b67f687f8c1f2ba204c07ce2ab0f448b5427987 (patch) | |
tree | 7bc68cc714505a842f95c6794e5a70120ccf250d /libcpp | |
parent | 1bf9a81cc714e6d15c58adf70d7b6a695c3ce0d5 (diff) | |
download | gcc-0b67f687f8c1f2ba204c07ce2ab0f448b5427987.tar.gz |
libcpp:
PR c/28768
PR preprocessor/14634
* lex.c (lex_string): Pedwarn for unterminated literals.
libgomp:
* configure.ac (HAVE_CLOCK_GETTIME): Add missing second argument
to AC_DEFINE.
* configure: Regenerate.
gcc/testsuite:
* gcc.dg/cpp/include2.c, gcc.dg/cpp/macspace1.c,
gcc.dg/cpp/macspace2.c, gcc.dg/cpp/multiline.c,
gcc.dg/cpp/trad/literals-2.c: Update expected diagnostics.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116915 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp')
-rw-r--r-- | libcpp/ChangeLog | 6 | ||||
-rw-r--r-- | libcpp/lex.c | 4 |
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); } |