diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-03-26 19:27:17 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-03-26 19:27:17 +0000 |
commit | f4858d06aeb586eda058b6b6baa4fc401db17f95 (patch) | |
tree | dc79a6a82c49de520ee04b9143b1f107c22fa275 /gcc/testsuite | |
parent | d9cee1b1a198bdd084f9c6afb3e6819a7f1bfc11 (diff) | |
download | gcc-f4858d06aeb586eda058b6b6baa4fc401db17f95.tar.gz |
PR c++/39554
* opts.c (warn_if_disallowed_function_p): Don't assume
get_callee_fndecl must return non-NULL.
* gcc.dg/wdisallowed-functions-3.c: New test.
* g++.dg/warn/Wdisallowed-functions-3.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145094 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/warn/Wdisallowed-functions-3.C | 10 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/wdisallowed-functions-3.c | 10 |
3 files changed, 26 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0bc39a28ab3..e3e6ab4932d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2009-03-26 Jakub Jelinek <jakub@redhat.com> + + PR c++/39554 + * gcc.dg/wdisallowed-functions-3.c: New test. + * g++.dg/warn/Wdisallowed-functions-3.C: New test. + 2009-03-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * gcc.dg/inline-33.c: Fix when pic. diff --git a/gcc/testsuite/g++.dg/warn/Wdisallowed-functions-3.C b/gcc/testsuite/g++.dg/warn/Wdisallowed-functions-3.C new file mode 100644 index 00000000000..3ecfb0c2264 --- /dev/null +++ b/gcc/testsuite/g++.dg/warn/Wdisallowed-functions-3.C @@ -0,0 +1,10 @@ +// PR c++/39554 +// { dg-do compile } +// { dg-options "-Wdisallowed-function-list=bar" } + +void +foo (void (*p) (), void (*bar) ()) +{ + p (); + bar (); +} diff --git a/gcc/testsuite/gcc.dg/wdisallowed-functions-3.c b/gcc/testsuite/gcc.dg/wdisallowed-functions-3.c new file mode 100644 index 00000000000..5b8b31bdfc9 --- /dev/null +++ b/gcc/testsuite/gcc.dg/wdisallowed-functions-3.c @@ -0,0 +1,10 @@ +/* PR c++/39554 */ +/* { dg-do compile } */ +/* { dg-options "-Wdisallowed-function-list=bar" } */ + +void +foo (void (*p) (void), void (*bar) (void)) +{ + p (); + bar (); +} |