From: Andreas Schwab Date: Fri, 11 Jul 2014 14:49:27 +0000 (+0000) Subject: re PR preprocessor/61389 (libcpp diagnostics shouldn't talk about ISO C99 for C+... X-Git-Tag: releases/gcc-5.1.0~6400 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c786fca61b0531b8b9b60b969c46421042a0bfeb;p=thirdparty%2Fgcc.git re PR preprocessor/61389 (libcpp diagnostics shouldn't talk about ISO C99 for C++ input files) PR preprocessor/61389 * gcc.dg/cpp/macsyntx.c: Update expected warnings. * gcc.dg/cpp/sysmac1.c: Likewise. From-SVN: r212457 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 324db9063630..dc362c3bebb5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2014-07-11 Andreas Schwab + + PR preprocessor/61389 + * gcc.dg/cpp/macsyntx.c: Update expected warnings. + * gcc.dg/cpp/sysmac1.c: Likewise. + 2014-07-11 Richard Biener PR middle-end/61473 diff --git a/gcc/testsuite/gcc.dg/cpp/macsyntx.c b/gcc/testsuite/gcc.dg/cpp/macsyntx.c index 495921efa140..146dcedab5fc 100644 --- a/gcc/testsuite/gcc.dg/cpp/macsyntx.c +++ b/gcc/testsuite/gcc.dg/cpp/macsyntx.c @@ -51,15 +51,15 @@ one(ichi\ two(ichi) /* { dg-error "requires 2" } */ var0() /* OK. */ var0(ichi) /* OK. */ -var1() /* { dg-warning "rest arguments to be used" } */ -var1(ichi) /* { dg-warning "rest arguments to be used" } */ +var1() /* { dg-warning "requires at least one" } */ +var1(ichi) /* { dg-warning "requires at least one" } */ var1(ichi, ni) /* OK. */ /* This tests two oddities of GNU rest args - omitting a comma is OK, and backtracking a token on pasting an empty rest args. */ #define rest(x, y...) x ## y /* { dg-warning "ISO C" } */ rest(ichi,) /* OK. */ -rest(ichi) /* { dg-warning "rest arguments to be used" } */ +rest(ichi) /* { dg-warning "requires at least one" } */ #if 23 != rest(2, 3) /* OK, no warning. */ #error 23 != 23 !! #endif diff --git a/gcc/testsuite/gcc.dg/cpp/sysmac1.c b/gcc/testsuite/gcc.dg/cpp/sysmac1.c index cc8469e18c71..54f161e020fe 100644 --- a/gcc/testsuite/gcc.dg/cpp/sysmac1.c +++ b/gcc/testsuite/gcc.dg/cpp/sysmac1.c @@ -22,5 +22,5 @@ (str); /* { dg-warning "used with arguments" } */ (sys_str); /* { dg-bogus "used with arguments" } */ -foo (one_arg); /* { dg-warning "requires rest arguments" } */ -sys_foo (one_arg); /* { dg-bogus "requires rest arguments" } */ +foo (one_arg); /* { dg-warning "requires at least one" } */ +sys_foo (one_arg); /* { dg-bogus "requires at least one" } */ diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index c62478d6044f..490bf4e50d15 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,7 +1,7 @@ 2014-07-10 Edward Smith-Rowland <3dw4rd@verizon.net> Jonathan Wakely - PR CPP/61389 + PR preprocessor/61389 * macro.c (_cpp_arguments_ok, parse_params, create_iso_definition): Warning messages mention C++11 in c++ mode and C99 in c mode. * lex.c (lex_identifier_intern, lex_identifier): Ditto