OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [cpp/] [Wsignprom.c] - Rev 298

Compare with Previous | Blame | View Log

/* { dg-do preprocess } */
/* { dg-options "-Wall" } */
 
/* Test that -Wall emits the warnings about integer promotion changing
   the sign of an operand.  */
 
#if -1 > 0U  /* { dg-warning "5:changes sign when promoted" } */
#endif
 
#if 0U + -1  /* { dg-warning "10:changes sign when promoted" } */
#endif
 
#if 0U * -1  /* { dg-warning "10:changes sign when promoted" } */
#endif
 
#if 1U / -2  /* { dg-warning "10:changes sign when promoted" } */
#endif
 
#if -1 % 1U  /* { dg-warning "5:changes sign when promoted" } */
#endif
 
#if 1 ? 0U : -1  /* { dg-warning "14:changes sign when promoted" } */
#endif
 
#if 1 ? -1 : 0U  /* { dg-warning "9:changes sign when promoted" } */
#endif
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.