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] - Rev 701

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

/* PR c/27273 */
/* { dg-do compile } */

// This used to warn about "overflow in implicit constant conversion",
// which was wrong; 512 is never converted to unsigned char.  Rather, an
// appropriate warning would be that the & expression always evaluates to 0
// because of the limited range of unsigned char.

unsigned char rx_async(unsigned char p) {
    return p & 512; /* { dg-warning "" "" { xfail *-*-* } } */
}

Go to most recent revision | 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.