view gcc/testsuite/gcc.dg/20031012-1.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
line wrap: on
line source

/* { dg-options "-Waddress" } */
/* Origin: Andrew Morton <akpm@osdl.org> */
/* Warn if a function address of a non-weak function is used
   as a truth value.  */
/* See thread starting at http://gcc.gnu.org/ml/gcc/2003-10/msg00414.html  */

void foo(void)
{}

void bar(void)
{}

int main() {
	if (foo) /* { dg-warning "" } */
		bar();
	return 0;
}