On 1 April 2014 14:43, Daniel Gutson wrote:
>
> The attached patch attempts to fix this issue. Since I no longer have
> write access, please
> apply this for me if correct (is the 4.8 branch still alive for adding 
> fixes?).

For regressions, yes, but I don't think this is a regression.

> Regarding 4.9, gcc fails to complain at all when -pedantic is passed,
> even specifying -std=c++03.
> Please let me know if this is truly a bug, in which case I could also
> fix it for the latest version as well

I believe it's by design.  The C++11 standard says in
[expr.reinterpret.cast] paragraph 8:

"Converting a function pointer to an object pointer type or vice versa
is conditionally-supported. The meaning
of such a conversion is implementation-defined, except that if an
implementation supports conversions in
both directions, converting a prvalue of one type to the other type
and back, possibly with different cv-
qualification, shall yield the original pointer value."

G++ has always supported it, but we previously warned with -pedantic
that it was not standard-conforming behaviour. Now it is conforming
(as long as we document the implementation-defined meaning of the
conversion).

Reply via email to