This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: (970929) reinterpret cast bug


>>>>> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]