Re: PING: [PATCH] Fix PRs c/52283/37985

2012-04-23 Thread Richard Guenther
On Fri, Apr 20, 2012 at 5:23 PM, Greta Yorsh  wrote:
> Here is a patch to fix the failing test gcc.dg/pr52283.c.
> Adding the missing dg-warning and dg-options.
>
> OK?

Ok.

Thanks,
Richard.

>
> gcc/testsuite/ChangeLog
>
> 2012-04-20  Greta Yorsh  
>
>        * gcc.dg/pr52283.c: Add missing dg-warning and dg-options.
>
>
> diff --git a/gcc/testsuite/gcc.dg/pr52283.c b/gcc/testsuite/gcc.dg/pr52283.c
> index 33785a5..070e71a 100644
> --- a/gcc/testsuite/gcc.dg/pr52283.c
> +++ b/gcc/testsuite/gcc.dg/pr52283.c
> @@ -1,6 +1,7 @@
>  /* Test for case labels not integer constant expressions but folding
>    to integer constants (used in Linux kernel).  */
>  /* { dg-do compile } */
> +/* { dg-options "-pedantic" } */
>
>  extern unsigned int u;
>
> @@ -9,7 +10,7 @@ b (int c)
>  {
>   switch (c)
>     {
> -    case (int) (2  | ((4 < 8) ? 8 : u)):
> +    case (int) (2  | ((4 < 8) ? 8 : u)): /* { dg-warning "case label is not
> an integer constant expression" } */
>       ;
>     }
>  }
>
>> -Original Message-
>> From: H.J. Lu [mailto:hjl.to...@gmail.com]
>> Sent: 19 April 2012 15:32
>> To: Manuel López-Ibáñez
>> Cc: Christian Bruel; Richard Guenther; gcc-patches@gcc.gnu.org; Joseph
>> S. Myers; Jason Merrill
>> Subject: Re: PING: [PATCH] Fix PRs c/52283/37985
>>
>> On Thu, Apr 19, 2012 at 3:17 AM, Manuel López-Ibáñez
>>  wrote:
>> > On 19 April 2012 11:11, Christian Bruel 
>> wrote:
>> >>
>> >>
>> >> On 04/18/2012 11:51 AM, Richard Guenther wrote:
>> >>> On Wed, Apr 18, 2012 at 11:06 AM, Manuel López-Ibáñez
>> >>>  wrote:
>> >>>> On 18 April 2012 10:29, Christian Bruel 
>> wrote:
>> >>>>>
>> >>>>> Is it OK for trunk, bootstrapped and regtested on x86
>> >>>>
>> >>>> I think Joseph Myers is on vacation, and there are no other C FE
>> >>>> reviewers, but since this is c-common and convert.c, perhaps Jason
>> >>>> and/or Richard can review it?
>> >>>
>> >>> The patch is ok if you put the PR52283 properly into a separate
>> testcase,
>> >>> not by amending gcc.dg/case-const-2.c.
>> >>>
>> >>
>> >> Thanks, done at rev #186586. with this change.
>> >
>> > Great!
>> >
>> > Just a minor nit, for future patches. There is the unwritten rule of
>> > adding the Changelogs to the commit log, like follows:
>> >
>> > 2012-04-19  Christian Bruel  
>> >                  Manuel López-Ibáñez  
>> >
>> >       PR c/52283
>> >       PR c/37985
>> >       * stmt.c (warn_if_unused_value): Skip NOP_EXPR.
>> >       * convert.c (convert_to_integer): Don't set TREE_NO_WARNING.
>> > testsuite/
>> >       * gcc.dg/pr52283.c: New test.
>> >       * gcc.dg/pr37985.c: New test.
>> >
>> >
>>
>> gcc.dg/pr52283.c failed on Linux/x86:
>>
>> FAIL: gcc.dg/pr52283.c (test for excess errors)
>>
>> --
>> H.J.
>
>
>


RE: PING: [PATCH] Fix PRs c/52283/37985

2012-04-20 Thread Greta Yorsh
Here is a patch to fix the failing test gcc.dg/pr52283.c. 
Adding the missing dg-warning and dg-options.

OK?


gcc/testsuite/ChangeLog

2012-04-20  Greta Yorsh  

* gcc.dg/pr52283.c: Add missing dg-warning and dg-options.


diff --git a/gcc/testsuite/gcc.dg/pr52283.c b/gcc/testsuite/gcc.dg/pr52283.c
index 33785a5..070e71a 100644
--- a/gcc/testsuite/gcc.dg/pr52283.c
+++ b/gcc/testsuite/gcc.dg/pr52283.c
@@ -1,6 +1,7 @@
 /* Test for case labels not integer constant expressions but folding
to integer constants (used in Linux kernel).  */
 /* { dg-do compile } */
+/* { dg-options "-pedantic" } */
 
 extern unsigned int u;
 
@@ -9,7 +10,7 @@ b (int c)
 {
   switch (c)
 {
-case (int) (2  | ((4 < 8) ? 8 : u)):
+case (int) (2  | ((4 < 8) ? 8 : u)): /* { dg-warning "case label is not
an integer constant expression" } */
   ;
 }
 }

> -Original Message-
> From: H.J. Lu [mailto:hjl.to...@gmail.com]
> Sent: 19 April 2012 15:32
> To: Manuel López-Ibáñez
> Cc: Christian Bruel; Richard Guenther; gcc-patches@gcc.gnu.org; Joseph
> S. Myers; Jason Merrill
> Subject: Re: PING: [PATCH] Fix PRs c/52283/37985
> 
> On Thu, Apr 19, 2012 at 3:17 AM, Manuel López-Ibáñez
>  wrote:
> > On 19 April 2012 11:11, Christian Bruel 
> wrote:
> >>
> >>
> >> On 04/18/2012 11:51 AM, Richard Guenther wrote:
> >>> On Wed, Apr 18, 2012 at 11:06 AM, Manuel López-Ibáñez
> >>>  wrote:
> >>>> On 18 April 2012 10:29, Christian Bruel 
> wrote:
> >>>>>
> >>>>> Is it OK for trunk, bootstrapped and regtested on x86
> >>>>
> >>>> I think Joseph Myers is on vacation, and there are no other C FE
> >>>> reviewers, but since this is c-common and convert.c, perhaps Jason
> >>>> and/or Richard can review it?
> >>>
> >>> The patch is ok if you put the PR52283 properly into a separate
> testcase,
> >>> not by amending gcc.dg/case-const-2.c.
> >>>
> >>
> >> Thanks, done at rev #186586. with this change.
> >
> > Great!
> >
> > Just a minor nit, for future patches. There is the unwritten rule of
> > adding the Changelogs to the commit log, like follows:
> >
> > 2012-04-19  Christian Bruel  
> >                  Manuel López-Ibáñez  
> >
> >       PR c/52283
> >       PR c/37985
> >       * stmt.c (warn_if_unused_value): Skip NOP_EXPR.
> >       * convert.c (convert_to_integer): Don't set TREE_NO_WARNING.
> > testsuite/
> >       * gcc.dg/pr52283.c: New test.
> >       * gcc.dg/pr37985.c: New test.
> >
> >
> 
> gcc.dg/pr52283.c failed on Linux/x86:
> 
> FAIL: gcc.dg/pr52283.c (test for excess errors)
> 
> --
> H.J.





Re: PING: [PATCH] Fix PRs c/52283/37985

2012-04-19 Thread H.J. Lu
On Thu, Apr 19, 2012 at 3:17 AM, Manuel López-Ibáñez
 wrote:
> On 19 April 2012 11:11, Christian Bruel  wrote:
>>
>>
>> On 04/18/2012 11:51 AM, Richard Guenther wrote:
>>> On Wed, Apr 18, 2012 at 11:06 AM, Manuel López-Ibáñez
>>>  wrote:
 On 18 April 2012 10:29, Christian Bruel  wrote:
>
> Is it OK for trunk, bootstrapped and regtested on x86

 I think Joseph Myers is on vacation, and there are no other C FE
 reviewers, but since this is c-common and convert.c, perhaps Jason
 and/or Richard can review it?
>>>
>>> The patch is ok if you put the PR52283 properly into a separate testcase,
>>> not by amending gcc.dg/case-const-2.c.
>>>
>>
>> Thanks, done at rev #186586. with this change.
>
> Great!
>
> Just a minor nit, for future patches. There is the unwritten rule of
> adding the Changelogs to the commit log, like follows:
>
> 2012-04-19  Christian Bruel  
>                  Manuel López-Ibáñez  
>
>       PR c/52283
>       PR c/37985
>       * stmt.c (warn_if_unused_value): Skip NOP_EXPR.
>       * convert.c (convert_to_integer): Don't set TREE_NO_WARNING.
> testsuite/
>       * gcc.dg/pr52283.c: New test.
>       * gcc.dg/pr37985.c: New test.
>
>

gcc.dg/pr52283.c failed on Linux/x86:

FAIL: gcc.dg/pr52283.c (test for excess errors)

-- 
H.J.


Re: PING: [PATCH] Fix PRs c/52283/37985

2012-04-19 Thread Manuel López-Ibáñez
On 19 April 2012 11:11, Christian Bruel  wrote:
>
>
> On 04/18/2012 11:51 AM, Richard Guenther wrote:
>> On Wed, Apr 18, 2012 at 11:06 AM, Manuel López-Ibáñez
>>  wrote:
>>> On 18 April 2012 10:29, Christian Bruel  wrote:

 Is it OK for trunk, bootstrapped and regtested on x86
>>>
>>> I think Joseph Myers is on vacation, and there are no other C FE
>>> reviewers, but since this is c-common and convert.c, perhaps Jason
>>> and/or Richard can review it?
>>
>> The patch is ok if you put the PR52283 properly into a separate testcase,
>> not by amending gcc.dg/case-const-2.c.
>>
>
> Thanks, done at rev #186586. with this change.

Great!

Just a minor nit, for future patches. There is the unwritten rule of
adding the Changelogs to the commit log, like follows:

2012-04-19  Christian Bruel  
  Manuel López-Ibáñez  

   PR c/52283
   PR c/37985
   * stmt.c (warn_if_unused_value): Skip NOP_EXPR.
   * convert.c (convert_to_integer): Don't set TREE_NO_WARNING.
testsuite/
   * gcc.dg/pr52283.c: New test.
   * gcc.dg/pr37985.c: New test.


Also, if you add to the commit logs the PR numbers like:
PR whatever/NUMBER
PR whatever2/NUMBER

then bugzilla will show the commit on each PR.

Cheers,

Manuel.


Re: PING: [PATCH] Fix PRs c/52283/37985

2012-04-19 Thread Christian Bruel


On 04/18/2012 11:51 AM, Richard Guenther wrote:
> On Wed, Apr 18, 2012 at 11:06 AM, Manuel López-Ibáñez
>  wrote:
>> On 18 April 2012 10:29, Christian Bruel  wrote:
>>>
>>> Is it OK for trunk, bootstrapped and regtested on x86
>>
>> I think Joseph Myers is on vacation, and there are no other C FE
>> reviewers, but since this is c-common and convert.c, perhaps Jason
>> and/or Richard can review it?
> 
> The patch is ok if you put the PR52283 properly into a separate testcase,
> not by amending gcc.dg/case-const-2.c.
> 

Thanks, done at rev #186586. with this change.

> Thanks,
> Richard.
> 
>> Thanks,
>>
>> Manuel.


Re: PING: [PATCH] Fix PRs c/52283/37985

2012-04-18 Thread Richard Guenther
On Wed, Apr 18, 2012 at 11:06 AM, Manuel López-Ibáñez
 wrote:
> On 18 April 2012 10:29, Christian Bruel  wrote:
>>
>> Is it OK for trunk, bootstrapped and regtested on x86
>
> I think Joseph Myers is on vacation, and there are no other C FE
> reviewers, but since this is c-common and convert.c, perhaps Jason
> and/or Richard can review it?

The patch is ok if you put the PR52283 properly into a separate testcase,
not by amending gcc.dg/case-const-2.c.

Thanks,
Richard.

> Thanks,
>
> Manuel.


Re: PING: [PATCH] Fix PRs c/52283/37985

2012-04-18 Thread Manuel López-Ibáñez
On 18 April 2012 10:29, Christian Bruel  wrote:
>
> Is it OK for trunk, bootstrapped and regtested on x86

I think Joseph Myers is on vacation, and there are no other C FE
reviewers, but since this is c-common and convert.c, perhaps Jason
and/or Richard can review it?

Thanks,

Manuel.