On Tue, Apr 1, 2014 at 10:54 AM, Jonathan Wakely <jwakely....@gmail.com> wrote:
> 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.

Why not? (I don't know the criteria, please let me know).
Upcoming Ubuntu LTS will have g++ 4.8.2, having this fixed will be
extremely useful.

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

So what about -std=c++03 or earlier standards?
BTW, shouldn't 4.8 be fixed accordingly for C++11 as well?

> [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).



-- 

Daniel F. Gutson
Chief Engineering Officer, SPD


San Lorenzo 47, 3rd Floor, Office 5

Córdoba, Argentina


Phone: +54 351 4217888 / +54 351 4218211

Skype: dgutson

Reply via email to