This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix c/16999, #ident is outputted wrong from preprocessor


On Fri, Oct 08, 2004 at 02:36:05PM -0400, Andrew Pinski wrote:
> This is what I added to the testsuite:
> The line is not wrapped, it is my mailer being messed up (and I don't
> know how to fix it).
> Index: gcc.dg/cpp/ident-1.c
> ===================================================================
> RCS file: gcc.dg/cpp/ident-1.c
> diff -N gcc.dg/cpp/ident-1.c
> --- /dev/null	1 Jan 1970 00:00:00 -0000
> +++ gcc.dg/cpp/ident-1.c	8 Oct 2004 18:33:03 -0000
> @@ -0,0 +1,7 @@
> +/* { dg-do preprocess } */
> +
> +/* Based on PR 16999 */
> +
> +#ident "this is an ident"
> +
> +/* { dg-final { scan-file "ident-1.i" "(^|\\n)#ident \"this is an 
> ident\"($|\\n)" } } */

Executing on host: /usr/src/build/467304-x86_64/BUILD/gcc-4.0.0-20041008/obj-x86_64-redhat-linux/gcc/xgcc -B/usr/src/build/467304-x86_64/BUILD/gcc-4.0.0-20041008/obj-x86_64-redhat-linux/gcc/ /usr/src/build/467304-x86_64/BUILD/gcc-4.0.0-20041008/gcc/testsuite/gcc.dg/cpp/ident-1.c    -ansi -pedantic-errors -E  -o ident-1.i    (timeout = 300)
/usr/src/build/467304-x86_64/BUILD/gcc-4.0.0-20041008/gcc/testsuite/gcc.dg/cpp/ident-1.c:5:2: #ident is a GCC extension
compiler exited with status 1

I have committed following fix as obvious.

2004-10-09  Jakub Jelinek  <jakub@redhat.com>

	* gcc.dg/cpp/ident-1.c: Add dg-options "".

--- gcc/testsuite/gcc.dg/cpp/ident-1.c.jj	2004-10-08 20:37:07.000000000 +0200
+++ gcc/testsuite/gcc.dg/cpp/ident-1.c	2004-10-09 00:46:31.061236298 +0200
@@ -1,4 +1,5 @@
 /* { dg-do preprocess } */
+/* { dg-options "" } */ /* shut off -pedantic */
 
 /* Based on PR 16999 */
 

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]