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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [compare6.c] - Blame information for rev 696

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

Line No. Rev Author Line
1 689 jeremybenn
/* PR c/2098 */
2
/* Test for a warning on comparison on out-of-range data.  */
3
/* { dg-do compile } */
4
/* { dg-options "-Wtype-limits" } */
5
 
6
signed char sc;
7
unsigned char uc;
8
 
9
void foo()
10
{
11
  if (sc == 10000) return; /* { dg-warning "always false" "signed" } */
12
  if (uc == 10000) return; /* { dg-warning "always false" "unsigned" } */
13
}

powered by: WebSVN 2.1.0

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