This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch testsuite gcc.dg]: Turn of ms-extensions for mingw target
- From: Kai Tietz <ktietz70 at googlemail dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 28 Nov 2014 19:00:05 +0100
- Subject: Re: [patch testsuite gcc.dg]: Turn of ms-extensions for mingw target
- Authentication-results: sourceware.org; auth=none
- References: <CAEwic4azzVr9MVpoKp_P-bVSju5DLbE2mfNC4SBzOaYT6DDxYg at mail dot gmail dot com> <alpine dot DEB dot 2 dot 10 dot 1411281748310 dot 18562 at digraph dot polyomino dot org dot uk>
2014-11-28 18:53 GMT+01:00 Joseph Myers <joseph@codesourcery.com>:
> On Fri, 28 Nov 2014, Kai Tietz wrote:
>
>> Hi,
>>
>> this patch turns off ms-extensions for mingw-targets to match
>> diagnostics checked in testcases.
>>
>> Ok for apply?
>
> For the tests using -std=<some ISO standard> -pedantic (or
> -pedantic-errors), are you saying the diagnostics are *different*, or that
> some constructs (that are invalid in the relevant ISO standard) are *not
> diagnosed at all*? If the latter, it's a bug in the MinGW port - when a
> conformance mode is selected, the constructs invalid in that mode must be
> diagnosed appropriately, independent of the target. You could for example
> disable ms-extensions if flag_iso, although it might be better to
> distinguish explicit and implicit ms-extensions and have the (pedantic,
> only OK because of implicit ms-extensions) case give a pedwarn and then
> continue with what it would have done with the extension enabled.
>
> --
> Joseph S. Myers
> joseph@codesourcery.com
Some diagnostics are different and some constructs getting allowed
with enabled ms-extensions flag. Additionally is the pedantic-flag
not automatically set for *-*-mingw* targets. So for enforcing
ISO-C++ pedantic checks the *-*-mingw* targets need to have explicit
set the -pedantic flag (which is on for some other targets by
default).
Kai