1 /* PR c/67730 */
2 /* { dg-do compile } */
3 /* { dg-options "" } */
4
5 #include "pr67730.h"
6
7 extern void bar (int);
8
9 int
fn1(void)10 fn1 (void)
11 {
12 int a = NULL; /* { dg-warning "initialization of 'int' from 'void \\*' makes integer from pointer" } */
13 a = NULL; /* { dg-warning "assignment to 'int' from 'void \\*' makes integer from pointer" } */
14 bar (NULL); /* { dg-warning "passing argument 1" } */
15 return NULL; /* { dg-warning "returning 'void \\*' from a function with return type 'int' makes integer from pointer" } */
16 }
17
18 int
fn2(void)19 fn2 (void)
20 {
21 RETURN; /* { dg-warning "returning 'void \\*' from a function with return type 'int' makes integer from pointer" } */
22 }
23