This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: [PATCH] pedantic warning behavior when casting void* to ptr-to-func, 4.8 and 4.9


On 1 April 2014 15:00, Daniel Gutson wrote:
>> For regressions, yes, but I don't think this is a regression.
>
> Why not? (I don't know the criteria, please let me know).

Did it work in previous versions?

A regression means something that used to work no longer works.

> Upcoming Ubuntu LTS will have g++ 4.8.2, having this fixed will be
> extremely useful.

It's not up to me, but personally I'd say it's a low priority fix.

If a user doesn't want the warning then they should not use -pedantic.
If they need to use -pedantic then they shouldn't be using
conditionally-supported casts.

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

As I said, G++ has always supported it, in any standard mode.

If you don't want the warning issued by previous versions then don't
use -pedantic.

> BTW, shouldn't 4.8 be fixed accordingly for C++11 as well?

Maybe, maybe not. There's always a risk making changes to stable
releases, so new features or low priority fixes are not always
backported. This particular one might be safe, but I don't know.


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