PR c/56980
[official-gcc.git] / gcc / testsuite / gcc.dg / cpp / charconst-2.c
blob59fa500e35f897b59e8dadbd57ece727719288ed
1 /* Copyright (C) 2001 Free Software Foundation, Inc. */
3 /* { dg-do compile } */
4 /* { dg-options "-fsigned-char" } */
6 /* Crosscompiling from i686-linux (32-bit) to x86_64-linux (64-bit)
7 gave extra warnings on the two assignments:
8 warning: large integer implicitly truncated to unsigned type
9 warning: overflow in implicit constant conversion
10 This test has been added as a regression test after fixing the bug
11 by Andreas Jaeger, 23 Nov 2001. */
12 int
13 main (void)
15 signed char c = '\xff';
16 unsigned char d = '\xff';
18 return 0;