This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: (970929) reinterpret cast bug
- To: khan at xraylith dot wisc dot edu (Mumit Khan), egcs-bugs at cygnus dot com
- Subject: Re: (970929) reinterpret cast bug
- From: Jason Merrill <jason at cygnus dot com>
- Date: 01 Oct 1997 18:23:35 -0700
- References: <199710012208.RAA06290.cygnus.egcs.bugs@eh_pc11.xraylith.wisc.edu>
>>>>> 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.
Jason