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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [cpp/] [Wsignprom.c] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 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 "changes sign when promoted" } */
8
#endif
9
 
10
#if 0U + -1  /* { dg-warning "changes sign when promoted" } */
11
#endif
12
 
13
#if 0U * -1  /* { dg-warning "changes sign when promoted" } */
14
#endif
15
 
16
#if 1U / -2  /* { dg-warning "changes sign when promoted" } */
17
#endif
18
 
19
#if -1 % 1U  /* { dg-warning "changes sign when promoted" } */
20
#endif
21
 
22
#if 1 ? 0U : -1  /* { dg-warning "changes sign when promoted" } */
23
#endif
24
 
25
#if 1 ? -1 : 0U  /* { dg-warning "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.