diff options
author | Joseph Myers <joseph@codesourcery.com> | 2006-09-13 02:04:18 +0100 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2006-09-13 02:04:18 +0100 |
commit | c663e301034033aa098dd63b3d141c8edb51c223 (patch) | |
tree | 7bc68cc714505a842f95c6794e5a70120ccf250d /libcpp | |
parent | 48de786822a56dbfc3d434c13d19d3dd91aa801e (diff) | |
download | gcc-c663e301034033aa098dd63b3d141c8edb51c223.zip gcc-c663e301034033aa098dd63b3d141c8edb51c223.tar.gz gcc-c663e301034033aa098dd63b3d141c8edb51c223.tar.bz2 |
re PR c/28768 (Preprocessor doesn't parse tokens correctly?)
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.
From-SVN: r116915
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 b03241b..16cf1fc 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 6dc0fd9..df09bd6 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); } |