diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 84f7c92d5d9..96d41b6558d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2003-10-12 Steven Bosscher + + * gcc.dg/20031012-1.c: New test. + 2003-10-12 Steven Bosscher * gcc.dg/weak/weak-3.c: Fix for new warning. diff --git a/gcc/testsuite/gcc.dg/20031012-1.c b/gcc/testsuite/gcc.dg/20031012-1.c new file mode 100644 index 00000000000..215c2b9c67c --- /dev/null +++ b/gcc/testsuite/gcc.dg/20031012-1.c @@ -0,0 +1,17 @@ +/* Origin: Andrew Morton */ +/* Warn if a function addres 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; +} +