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

The reason it's important IMHO is when dealing with C programs that
handle functions
with void* (such as dlsym() ), so you do want the pedantic check for
your whole program,
but locally disable it in the assignment/casting lines, as shown in
the test case of the patch,
so warnings pollution can be avoided (specially important when the
output of the compiler
is processed in automated software production lines in the industry).
The -pedantic flag is a very powerful portability-assurance tool.


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

Let's continue the discussion, if any, in the gcc-patches list please, where I
re-posted the patch.
I wrongly posted it here.

-- 

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