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] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do preprocess } */
2
/* { dg-options "-Wall" } */
3
 
4
/* Test that -Wall emits the warnings about integer promotion changing
5
   the sign of an operand.  */
6
 
7
#if -1 > 0U  /* { dg-warning "5:changes sign when promoted" } */
8
#endif
9
 
10
#if 0U + -1  /* { dg-warning "10:changes sign when promoted" } */
11
#endif
12
 
13
#if 0U * -1  /* { dg-warning "10:changes sign when promoted" } */
14
#endif
15
 
16
#if 1U / -2  /* { dg-warning "10:changes sign when promoted" } */
17
#endif
18
 
19
#if -1 % 1U  /* { dg-warning "5:changes sign when promoted" } */
20
#endif
21
 
22
#if 1 ? 0U : -1  /* { dg-warning "14:changes sign when promoted" } */
23
#endif
24
 
25
#if 1 ? -1 : 0U  /* { dg-warning "9:changes sign when promoted" } */
26
#endif

powered by: WebSVN 2.1.0

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