diff options
author | Joseph Myers <jsm@polyomino.org.uk> | 2004-01-09 20:03:58 +0000 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2004-01-09 20:03:58 +0000 |
commit | 3897f229d5ef6d5767e1050388c24ae5be2f71e8 (patch) | |
tree | 48c28794b46861cbc9594568abc9b07c1a04b91e /gcc/except.c | |
parent | 0fab64a344486770d0acc827ab6b670543d58a15 (diff) | |
download | gcc-3897f229d5ef6d5767e1050388c24ae5be2f71e8.tar.gz |
re PR c/11234 (-pedantic accepts function pointer <-> void*)
PR c/11234
* c-typeck.c (build_c_cast): If pedantic, warn for conversions
between function and object pointers.
(digest_init): When comparing a pointer to function type to the
target type, only apply TREE_TYPE once to the pointer to function
type.
* except.c (for_each_eh_label_1): Treat data as a pointer to a
function pointer rather than casting it to a function pointer.
(for_each_eh_label): Update caller.
* recog.h (struct insn_data): Use a struct or union for output.
* genoutput.c (output_insn_data): Update.
* final.c (get_insn_template): Update.
testsuite:
* gcc.dg/func-ptr-conv-1.c: New test.
* gcc.dg/weak/weak-6.c, gcc.dg/weak/weak-7.c: Update.
From-SVN: r75595
Diffstat (limited to 'gcc/except.c')
-rw-r--r-- | gcc/except.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/except.c b/gcc/except.c index 5958eae290f..1468d3b909f 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -1,6 +1,6 @@ /* Implements exception handling. Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. Contributed by Mike Stump <mrs@cygnus.com>. This file is part of GCC. @@ -2430,14 +2430,14 @@ void for_each_eh_label (void (*callback) (rtx)) { htab_traverse (cfun->eh->exception_handler_label_map, for_each_eh_label_1, - (void *)callback); + (void *) &callback); } static int for_each_eh_label_1 (void **pentry, void *data) { struct ehl_map_entry *entry = *(struct ehl_map_entry **)pentry; - void (*callback) (rtx) = (void (*) (rtx)) data; + void (*callback) (rtx) = *(void (**) (rtx)) data; (*callback) (entry->label); return 1; |