This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: (970929) reinterpret cast bug
- To: Jason Merrill <jason at cygnus dot com>
- Subject: Re: (970929) reinterpret cast bug
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 03 Oct 1997 21:01:52 -0300
- Cc: khan at xraylith dot wisc dot edu (Mumit Khan), egcs-bugs at cygnus dot com
- References: <199710012208.RAA06290.cygnus.egcs.bugs@eh_pc11.xraylith.wisc.edu> <u9wwjx0xgo.fsf@yorick.cygnus.com>
Jason Merrill writes:
>>>>>> Mumit Khan <khan@xraylith.wisc.edu> writes:
>> egcs snapshots don't like casting from "void *" to function pointers
>> even with the old sledgehammer namely reinterpret_cast
> Yep; the standard only allows for casting between function pointers, or
> between object pointers. I assume this is to allow for targets where
> addresses of code and data have different representations. No reason why
> we can't allow it without -pedantic in g++, I suppose. Contributions
> welcome.
This patch should do.
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
Universidade Estadual de Campinas, SP, Brasil
vptr2fptr.diff