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: Joseph Myers <joseph at codesourcery dot com>
- To: Kai Tietz <ktietz70 at googlemail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 28 Nov 2014 18:10:27 +0000
- 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> <CAEwic4Yz4DAeHqJZVLrB4WtCHOvD78ctNtgXth+h0VSPFaxrKw at mail dot gmail dot com>
On Fri, 28 Nov 2014, Kai Tietz wrote:
> 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).
It seems very odd for the default dg-options to vary depending on target -
where is that target-dependent default set?
But for my main point: -std=c11 -pedantic-errors must diagnose with an
error anything where C11 requires a diagnostic. Not "anything where C11
requires a diagnostic, except for certain extensions on MinGW targets".
It must not be necessary to add -fno-ms-extensions for such diagnostics;
the options for conformance must not depend on the target. So for the
cases where the test uses -std=<some ISO standard>
-pedantic/-pedantic-errors, you need to fix the port: the test failures
are showing up an actual bug in the port, and the tests are correct as-is.
The same principle of course applies to C++ tests, though I didn't examine
your changes to those to see if the same issue applies to any of those
changes.
--
Joseph S. Myers
joseph@codesourcery.com