comparison gcc/testsuite/gcc.dg/pr67730-2.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
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
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
19 fn2 (void)
20 {
21 RETURN; /* { dg-warning "returning 'void \\*' from a function with return type 'int' makes integer from pointer" } */
22 }