diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-09 20:03:58 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-09 20:03:58 +0000 |
commit | 48b3d38531f2736ec62d5d3af89cfc1b3a10aeea (patch) | |
tree | 48c28794b46861cbc9594568abc9b07c1a04b91e /gcc/final.c | |
parent | 60ffaf4d23b6385206e6fc4cc3a44a964e88d776 (diff) | |
download | gcc-48b3d38531f2736ec62d5d3af89cfc1b3a10aeea.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75595 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/final.c')
-rw-r--r-- | gcc/final.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/final.c b/gcc/final.c index ea9aa4bbb48..fbbff317d5e 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -1,6 +1,6 @@ /* Convert RTL to assembler code and output it, for GNU compiler. Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, - 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of GCC. @@ -1591,17 +1591,16 @@ final (rtx first, FILE *file, int optimize, int prescan) const char * get_insn_template (int code, rtx insn) { - const void *output = insn_data[code].output; switch (insn_data[code].output_format) { case INSN_OUTPUT_FORMAT_SINGLE: - return (const char *) output; + return insn_data[code].output.single; case INSN_OUTPUT_FORMAT_MULTI: - return ((const char *const *) output)[which_alternative]; + return insn_data[code].output.multi[which_alternative]; case INSN_OUTPUT_FORMAT_FUNCTION: if (insn == NULL) abort (); - return (*(insn_output_fn) output) (recog_data.operand, insn); + return (*insn_data[code].output.function) (recog_data.operand, insn); default: abort (); |