]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/c-typeck.c
re PR c/11234 (-pedantic accepts function pointer <-> void*)
authorJoseph Myers <jsm@polyomino.org.uk>
Fri, 9 Jan 2004 20:03:58 +0000 (20:03 +0000)
committerJoseph Myers <jsm28@gcc.gnu.org>
Fri, 9 Jan 2004 20:03:58 +0000 (20:03 +0000)
commit3897f229d5ef6d5767e1050388c24ae5be2f71e8
tree48c28794b46861cbc9594568abc9b07c1a04b91e
parent0fab64a344486770d0acc827ab6b670543d58a15
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
gcc/ChangeLog
gcc/c-typeck.c
gcc/except.c
gcc/final.c
gcc/genoutput.c
gcc/recog.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/func-ptr-conv-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/weak/weak-6.c
gcc/testsuite/gcc.dg/weak/weak-7.c