diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 81f7c7fbc55b2b0ca22b251b20752fa9927d3253..6169fddc6f16b34b1655512df133a728226226b1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2006-09-13 Joseph S. Myers <joseph@codesourcery.com> + + PR c/28768 + PR preprocessor/14634 + * 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. + 2006-09-12 Eric Botcazou <ebotcazou@libertysurf.fr> * gcc.dg/pr28243.c: New test. diff --git a/gcc/testsuite/gcc.dg/cpp/include2.c b/gcc/testsuite/gcc.dg/cpp/include2.c index 60edfccb0cd658181e7bf2658204a16cf87c588b..46844bf2cc180e6d0e823cea55a8feeda25959db 100644 --- a/gcc/testsuite/gcc.dg/cpp/include2.c +++ b/gcc/testsuite/gcc.dg/cpp/include2.c @@ -13,4 +13,4 @@ /* These error is No such file or directory, just once. However, this message is locale-dependent, so don't test for it. */ /* { dg-error "silly" "" { target *-*-* } 10 } */ - +/* { dg-error "missing" "" { target *-*-* } 11 } */ diff --git a/gcc/testsuite/gcc.dg/cpp/macspace1.c b/gcc/testsuite/gcc.dg/cpp/macspace1.c index ddd62c743b9a0e4635ee9b4630f26f6affaeb786..daf14d2b1f13f4a3f070ba437c13280309b5a859 100644 --- a/gcc/testsuite/gcc.dg/cpp/macspace1.c +++ b/gcc/testsuite/gcc.dg/cpp/macspace1.c @@ -59,3 +59,5 @@ #define ag"abc" /* { dg-warning "missing whitespace" } */ int dummy; +/* { dg-error "missing terminating" "" { target *-*-* } 6 } */ +/* { dg-error "missing terminating" "" { target *-*-* } 10 } */ diff --git a/gcc/testsuite/gcc.dg/cpp/macspace2.c b/gcc/testsuite/gcc.dg/cpp/macspace2.c index 21576fa22fa438665b46dbf68a7dcaec79ee25f0..7a81eceeac8b813639632b63a6a41065b79f4f89 100644 --- a/gcc/testsuite/gcc.dg/cpp/macspace2.c +++ b/gcc/testsuite/gcc.dg/cpp/macspace2.c @@ -59,3 +59,5 @@ #define ag"abc" /* { dg-error "requires whitespace" } */ int dummy; +/* { dg-error "missing terminating" "" { target *-*-* } 6 } */ +/* { dg-error "missing terminating" "" { target *-*-* } 10 } */ diff --git a/gcc/testsuite/gcc.dg/cpp/multiline.c b/gcc/testsuite/gcc.dg/cpp/multiline.c index a71ebc69d88fab07aaaa8cb17fb572c161c403de..38798bdfaafa3d236d3a222327dcdf02161a3820 100644 --- a/gcc/testsuite/gcc.dg/cpp/multiline.c +++ b/gcc/testsuite/gcc.dg/cpp/multiline.c @@ -19,5 +19,7 @@ L"line 1 /* Nowhere in the output of this file should there be a blank line. We check for that in the .i file. { dg-final { scan-file-not multiline.i "(^|\\n)\\n" } } */ -/* { dg-bogus "missing term" "multiline strings" { target *-*-* } 11 } */ -/* { dg-bogus "warning" "warning in place of error" { target *-*-* } 15 } */ +/* { dg-warning "missing term" "multiline strings" { target *-*-* } 11 } */ +/* { dg-warning "missing term" "multiline strings" { target *-*-* } 14 } */ +/* { dg-warning "missing term" "multiline strings" { target *-*-* } 15 } */ +/* { dg-warning "missing term" "multiline strings" { target *-*-* } 18 } */ diff --git a/gcc/testsuite/gcc.dg/cpp/trad/literals-2.c b/gcc/testsuite/gcc.dg/cpp/trad/literals-2.c index 29ffcbfbdeec763e140304de943da65e31fe01d6..767ed77ffb8d769fe5856b35f6cfb7a419ecca68 100644 --- a/gcc/testsuite/gcc.dg/cpp/trad/literals-2.c +++ b/gcc/testsuite/gcc.dg/cpp/trad/literals-2.c @@ -2,7 +2,7 @@ recognized. */ /* { dg-do preprocess } */ - +/* { dg-error "missing terminating" "bad charconst" { target *-*-* } 7 } */ /* { dg-error "not valid" "bad charconst" { target *-*-* } 7 } */ #if 'x #endif diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index b03241bff996c72bfc8178be6724c53584eec892..16cf1fc6c048313c6cc18ed71b82e55743348c09 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 6dc0fd9d8df5e75e5fc6ed357580cb52d990d8ec..df09bd6d3d687c62887b89f4f6f731a14210143e 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); } diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 62ed9e9353a2a7e4b85c6db72ff41600b9a91b34..5a5f3030e0967bd515aa942fc0dde2d7361503bd 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,11 @@ +2006-09-13 Joseph S. Myers <joseph@codesourcery.com> + + PR c/28768 + PR preprocessor/14634 + * configure.ac (HAVE_CLOCK_GETTIME): Add missing second argument + to AC_DEFINE. + * configure: Regenerate. + 2006-09-08 Steven G. Kargl <kargl@gcc.gnu.org> * testsuite/libgomp.fortran/reduction3.f90: Change diff --git a/libgomp/configure b/libgomp/configure index 28e3c998a36975642cdbbe1b2ad681b1ead22fd0..f14cb657ade4b7422911e2205b5b964dd806dbd1 100755 --- a/libgomp/configure +++ b/libgomp/configure @@ -5831,8 +5831,9 @@ fi break done if test "$acx_cv_header_stdint" = stddef.h; then - acx_cv_header_stdint_kind="(lacks uintptr_t)" + acx_cv_header_stdint_kind="(lacks uintmax_t)" for i in stdint.h $inttype_headers; do + unset ac_cv_type_uintptr_t unset ac_cv_type_uint32_t unset ac_cv_type_uint64_t echo $ECHO_N "looking for an incomplete stdint.h in $i, $ECHO_C" >&6 @@ -5958,11 +5959,65 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_uint64_t" >&5 echo "${ECHO_T}$ac_cv_type_uint64_t" >&6 -if test $ac_cv_type_uint64_t = yes; then - : + + echo "$as_me:$LINENO: checking for uintptr_t" >&5 +echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6 +if test "${ac_cv_type_uintptr_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - acx_cv_header_stdint_kind="(lacks uintptr_t and uint64_t)" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <sys/types.h> +#include <$i> + +int +main () +{ +if ((uintptr_t *) 0) + return 0; +if (sizeof (uintptr_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_uintptr_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_uintptr_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi +echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6 break done @@ -6095,11 +6150,6 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_u_int64_t" >&5 echo "${ECHO_T}$ac_cv_type_u_int64_t" >&6 -if test $ac_cv_type_u_int64_t = yes; then - : -else - acx_cv_header_stdint_kind="(u_intXX_t style, lacks u_int64_t)" -fi break done @@ -8755,8 +8805,9 @@ echo "$as_me:$LINENO: result: $ac_cv_lib_rt_clock_gettime" >&5 echo "${ECHO_T}$ac_cv_lib_rt_clock_gettime" >&6 if test $ac_cv_lib_rt_clock_gettime = yes; then LIBS="-lrt $LIBS" - cat >>confdefs.h <<\_ACEOF -#define HAVE_CLOCK_GETTIME Define to 1 if you have the `clock_gettime' function. + +cat >>confdefs.h <<\_ACEOF +#define HAVE_CLOCK_GETTIME 1 _ACEOF fi diff --git a/libgomp/configure.ac b/libgomp/configure.ac index 5d11982b157a7bbbb8e2b51baa1dce48d4673062..d6f960e383351d4c6d79ee3770178f09bc46a665 100644 --- a/libgomp/configure.ac +++ b/libgomp/configure.ac @@ -227,7 +227,7 @@ esac if test $ac_cv_func_clock_gettime = no; then AC_CHECK_LIB(rt, clock_gettime, [LIBS="-lrt $LIBS" - AC_DEFINE(HAVE_CLOCK_GETTIME, + AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Define to 1 if you have the `clock_gettime' function.])]) fi