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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [warn/] [Wnull-conversion-1.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
// { dg-do compile }
2
// { dg-options "-Wconversion-null" }
3
 
4
#include 
5
 
6
void func1(int* ptr);
7
 
8
void func2() {
9
  int* t = false;             // { dg-warning "converting 'false' to pointer" }
10
  int* p;
11
  p = false;                  // { dg-warning "converting 'false' to pointer" }
12
  int* r = sizeof(char) / 2;
13
  func1(false);               // { dg-warning "converting 'false' to pointer" }
14
  int i = NULL;               // { dg-warning "converting to non-pointer" }
15
}

powered by: WebSVN 2.1.0

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