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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [ordered-comparison-1.c] - Blame information for rev 749

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

Line No. Rev Author Line
1 689 jeremybenn
/* Test warning for ordered comparison pointer with null pointer constant. */
2
/* Tested with no warning option. */
3
/* { dg-do compile } */
4
/* { dg-options "" } */
5
extern void z();
6
void *p;
7
 
8
void f() {
9
 if (z >= 0)
10
   z();
11
 if (0 >= z)
12
    z();
13
 if (p >= (void*)0)
14
    z();
15
 if ((void*)0 >= p)
16
    z();
17
 if (z >= (void*)0) /* { dg-warning "distinct pointer types lacks a cast" } */
18
    z();
19
 if ((void*)0 >=z) /* { dg-warning "distinct pointer types lacks a cast" } */
20
    z();
21
}

powered by: WebSVN 2.1.0

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