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, testsuite] Fix gcc.c-torture/execute/20101011-1.c


On 10/31/2010 2:43 PM, Gerald Pfeifer wrote:
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

DO_TEST is always defined in the testcase, which is what led to the original problem.

-Pat


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