This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, testsuite] Fix gcc.c-torture/execute/20101011-1.c
- From: Gerald Pfeifer <gerald at pfeifer dot com>
- To: Pat Haugen <pthaugen at linux dot vnet dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 31 Oct 2010 20:43:42 +0100 (CET)
- Subject: Re: [PATCH, testsuite] Fix gcc.c-torture/execute/20101011-1.c
- References: <4CC9ECFF.8020208@linux.vnet.ibm.com>
On Thu, 28 Oct 2010, Pat Haugen wrote:
> 2010-10-29 Pat Haugen <pthaugen@us.ibm.com>
> * gcc.c-torture/execute/20101011-1.c: Fix #ifdef.
>
>
> Index: gcc.c-torture/execute/20101011-1.c
> ===================================================================
> --- gcc.c-torture/execute/20101011-1.c (revision 166039)
> +++ gcc.c-torture/execute/20101011-1.c (working copy)
> @@ -35,7 +35,7 @@ int k;
> int
> main ()
> {
> -#ifdef DO_TEST
> +#if DO_TEST
That will run afoul -Wundef. Not sure what alternative is best,
something like
#ifdef DO_TEST
# if DO_TEST
# endif
#endif
perhaps, or
#if defined(DO_TEST) && DO_TEST
?
Or someone just says there are so many of these everywhere that
we shouldn't worry about -Wundef, of course...
Gerald