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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [warn/] [overflow-warn-5.C] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
/* PR c/27273 */
2
/* { dg-do compile } */
3
 
4
// This used to warn about "overflow in implicit constant conversion",
5
// which was wrong; 512 is never converted to unsigned char.  Rather, an
6
// appropriate warning would be that the & expression always evaluates to 0
7
// because of the limited range of unsigned char.
8
 
9
unsigned char rx_async(unsigned char p) {
10
    return p & 512; /* { dg-warning "" "" { xfail *-*-* } } */
11
}

powered by: WebSVN 2.1.0

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