This is the mail archive of the gcc-patches@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: Ping - old patch from April - mingw support for I32/I64 MS printf formatters to c-format.c


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


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