This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C PATCH] Make unsigned_conversion_warning static
- From: Roger Sayle <roger at eyesopen dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 1 May 2006 10:19:04 -0600 (MDT)
- Subject: Re: [C PATCH] Make unsigned_conversion_warning static
On Mon, 1 May 2006, Joseph S. Myers wrote:
> It's for cases such as
>
> unsigned f(unsigned a) { return a + -1; }
>
> with -Wconversion. OK with such a testcase added to the testsuite.
Many thanks for the speedy review. I've now committed this change
to mainline as revision 113418 with the following two testcases
(after confirming that this behaviour is indeed unchanged).
2006-05-01 Roger Sayle <roger@eyesopen.com>
Joseph S. Myers <joseph@codesourcery.com>
* gcc.dg/Wconversion-3.c: New test case.
* gcc.dg/Wconversion-4.c: Likewise.
/* { dg-do compile } */
/* { dg-options "-O2 -Wconversion" } */
unsigned f(unsigned a) { return a + -1; } /* { dg-warning "negative" } */
/* { dg-do compile } */
/* { dg-options "-O2" } */
unsigned f(unsigned a) { return a + -1; }
Roger
--