This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH preprocessor/61389] - libcpp diagnostics shouldn't talk about ISO C99 for C++ input files
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: Ed Smith-Rowland <3dw4rd at verizon dot net>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Jonathan Wakely <jwakely dot gcc at gmail dot com>, Jason Merrill <jason at redhat dot com>
- Date: Fri, 11 Jul 2014 16:49:50 +0200
- Subject: Re: [PATCH preprocessor/61389] - libcpp diagnostics shouldn't talk about ISO C99 for C++ input files
- Authentication-results: sourceware.org; auth=none
- References: <53BE9AE3 dot 30001 at verizon dot net>
Tested on x86_64-suse-linux and installed as obvious.
Andreas.
PR preprocessor/61389
* gcc.dg/cpp/macsyntx.c: Update expected warnings.
* gcc.dg/cpp/sysmac1.c: Likewise.
diff --git a/gcc/testsuite/gcc.dg/cpp/macsyntx.c b/gcc/testsuite/gcc.dg/cpp/macsyntx.c
index 495921e..146dced 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 cc8469e..54f161e 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" } */
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."