This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Ping - old patch from April - mingw support for I32/I64 MS printf formatters to c-format.c
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Kai Tietz <Kai dot Tietz at onevision dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, NightStrike <nightstrike at gmail dot com>
- Date: Tue, 18 Dec 2007 15:54:28 +0000 (UTC)
- Subject: Re: Ping - old patch from April - mingw support for I32/I64 MS printf formatters to c-format.c
- References: <OFD2908D61.6F7A118A-ONC12573B5.0048317D-C12573B5.004940B6@onevision.de>
On Tue, 18 Dec 2007, Kai Tietz wrote:
> I added updated the patch against current head version of gcc and add a
> test-case for the common case that the system (crt) version of formatter
> is used. For mingw targets there is no %lld formatter existing. Instead MS
> functions are using %I64d and %I64d. This patch additionally allows the
> user to define a alternative formatter beside the system one for i386
> targets. The default formatters are named "gnu_*" and the MS specific
> "ms_*".
>
> This patch is tested for *-pc-mingw32 (using MS %I32 and %I64) and for
> i686-pc-cygwin (for the gnu variant).
The new test needs to go in gcc.dg/format, and where possible tests should
use format.h. In addition to testing the new Windows format, you need to
test that all the standard and GNU features not supported by Windows
receive proper diagnostics.
Did you really get clean test results for all the existing testcases in
gcc.dg/format on MinGW? Since they use system functions such as printf,
I'd have expected many failures as they test features not supported by
Windows. This would require appropriate arrangements for the functions to
be declared with the gnu_* attributes on Windows, or to be mapped with
#define to functions so declared (as the minimal change to keep the tests
working) for most tests, with separate Windows-only tests that appropriate
features are accepted and rejected for the system and ms_ formats.
Does the set of format features supported on Windows depend at all on the
version of Windows? If so, for what version of Windows did you prepare
the tables of supported features?
--
Joseph S. Myers
joseph@codesourcery.com