summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr67730-2.c
blob: 29d726754bf0308d40b4f83e4b9daf26eca2b04e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* PR c/67730 */
/* { dg-do compile } */
/* { dg-options "" } */

#include "pr67730.h"

extern void bar (int);

int
fn1 (void)
{
  int a = NULL; /* { dg-warning "initialization makes integer from pointer" } */
  a = NULL; /* { dg-warning "assignment makes integer from pointer" } */
  bar (NULL); /* { dg-warning "passing argument 1" } */
  return NULL; /* { dg-warning "return makes integer from pointer" } */
}

int
fn2 (void)
{
  RETURN; /* { dg-warning "return makes integer from pointer" } */
}