(970929) reinterpret cast bug
Alexandre Oliva
oliva@dcc.unicamp.br
Thu Oct 2 16:02:00 GMT 1997
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.
How hard would it be to check whether a pointer to object has is as
large as a pointer to function, and make it a pedantic warning or not
depending on that?
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
Universidade Estadual de Campinas, SP, Brasil
More information about the Gcc-bugs
mailing list