OSDN Git Service

ms format support for mingw.
authorktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 20 Mar 2008 08:24:42 +0000 (08:24 +0000)
committerktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 20 Mar 2008 08:24:42 +0000 (08:24 +0000)
commit635c5a98b480ede2219e3958ad30a09a1a5ae8ee
tree94f77b9dcfa7f65e6f1d0cb3bf1f33aa6aa35165
parent877e109392527c5e815087c02b26d2286c8364b3
ms format support for mingw.

for gcc:
* c-format.c (replace_format_name_to_system_name): New.
(cmp_attribs): New.
(convert_format_name_to_system_name): New.
(decode_format_attr): Add use of convert_format_name_to_system_name.
(format_types_orig): Add gnu_ prefix to names.
(check_format_info_main): Special treating of \0 escaped names for
supporting multi-character format specifiers as I32, I64.
(TARGET_OVERRIDES_FORMAT_ATTRIBUTES): Use of user defined attributes.
(gnu_target_overrides_format_attributes): New.
* c-format.h: Add structure target_ovr_attr to hold
system specific formatter names.
* config.gcc: Add for x86&x86_64 cygwin and mingw32 targets the
msformat-c.o file to c_target_objs and cxx_target_objs.
* config/i386/mingw32.h (TARGET_OVERRIDES_FORMAT_ATTRIBUTES): New.
(TARGET_OVERRIDES_FORMAT_ATTRIBUTES_COUNT): New.
(TARGET_N_FORMAT_TYPES): New.
* config/i386/msformat-c.c: New.
* config/i386/t-cygming: Add build rule for msformat-c.o.
* doc/extend.texi: Add new format names gnu_* and ms_* and
further details.
* doc/tm.texi: (TARGET_OVERRIDES_FORMAT_ATTRIBUTES): New.

for gcc/testsuite/

* gcc.dg/format/ms_array-1.c: New.
* gcc.dg/format/ms_c90-scanf-3.c: New.
* gcc.dg/format/ms_c99-strftime-1.c: New.
* gcc.dg/format/ms_no-y2k-1.c: New.
* gcc.dg/format/ms_attr-1.c: New.
* gcc.dg/format/ms_c90-scanf-4.c: New.
* gcc.dg/format/ms_c99-strftime-2.c: New.
* gcc.dg/format/ms_nonlit-1.c: New.
* gcc.dg/format/ms_c90-scanf-5.c: New.
* gcc.dg/format/ms_cast-1.c: New.
* gcc.dg/format/ms_nonlit-2.c: New.
* gcc.dg/format/ms_attr-2.c: New.
* gcc.dg/format/ms_c90-strftime-1.c: New.
* gcc.dg/format/ms_miss-1.c: New.
* gcc.dg/format/ms_nonlit-3.c: New.
* gcc.dg/format/ms_attr-3.c: New.
* gcc.dg/format/ms_c90-strftime-2.c: New.
* gcc.dg/format/ms_miss-2.c: New.
* gcc.dg/format/ms_nul-1.c: New.
* gcc.dg/format/ms_attr-4.c: New.
* gcc.dg/format/ms_c94-printf-1.c: New.
* gcc.dg/format/ms_miss-3.c: New.
* gcc.dg/format/ms_nul-2.c: New.
* gcc.dg/format/ms_attr-7.c: New.
* gcc.dg/format/ms_c94-scanf-1.c: New.
* gcc.dg/format/ms_miss-4.c: New.
* gcc.dg/format/ms_null-1.c: New.
* gcc.dg/format/ms_bitfld-1.c: New.
* gcc.dg/format/ms_c99-printf-1.c: New.
* gcc.dg/format/ms_miss-5.c: New.
* gcc.dg/format/ms_plus-1.c: New.
* gcc.dg/format/ms_branch-1.c: New.
* gcc.dg/format/ms_c99-printf-2.c: New.
* gcc.dg/format/ms_miss-6.c: New.
* gcc.dg/format/ms_sec-1.c: New.
* gcc.dg/format/ms_c90-printf-1.c: New.
* gcc.dg/format/ms_c99-printf-3.c: New.
* gcc.dg/format/ms_multattr-1.c: New.
* gcc.dg/format/ms_unnamed-1.c: New.
* gcc.dg/format/ms_c90-printf-2.c: New.
* gcc.dg/format/ms_c99-scanf-1.c: New.
* gcc.dg/format/ms_multattr-2.c: New.
* gcc.dg/format/ms_va-1.c: New.
* gcc.dg/format/ms_c90-printf-3.c: New.
* gcc.dg/format/ms_c99-scanf-2.c: New.
* gcc.dg/format/ms_multattr-3.c: New.
* gcc.dg/format/ms_warnll-1.c: New.
* gcc.dg/format/ms_c90-scanf-1.c: New.
* gcc.dg/format/ms_c99-scanf-3.c: New.
* gcc.dg/format/ms_no-exargs-1.c: New.
* gcc.dg/format/ms_zero-length-1.c: New.
* gcc.dg/format/ms_c90-scanf-2.c: New.
* gcc.dg/format/ms_c99-scanf-4.c: New.
* gcc.dg/format/ms_no-exargs-2.c: New.
* gcc.dg/format/null-1.c: Add gnu style usage for mingw.
* gcc.dg/format/miss-1.c: Likewise.
* gcc.dg/format/miss-3.c: Likewise.
* gcc.dg/format/multattr-2.c: Likewise.
* gcc.dg/format/miss-5.c: Likewise.
* gcc.dg/format/attr-2.c: Likewise.
* gcc.dg/format/attr-4.c: Likewise.
* gcc.dg/format/c90-scanf-4.c: Likewise.
* gcc.dg/format/c99-printf-3.c: Likewise.
* gcc.dg/format/multattr-1.c: Likewise.
* gcc.dg/format/miss-4.c: Likewise.
* gcc.dg/format/miss-6.c: Likewise.
* gcc.dg/format/c90-printf-3.c: Likewise.
* gcc.dg/format/attr-1.c: Likewise.
* gcc.dg/format/attr-3.c: Likewise.
* gcc.dg/format/attr-7.c: Likewise.
* gcc.dg/format/format.h: Treat mingw and gnu style.
* gcc.dg/format/sys_format.c: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@133365 138bc75d-0d04-0410-961f-82ee72b054a4
81 files changed:
gcc/ChangeLog
gcc/c-format.c
gcc/c-format.h
gcc/config.gcc
gcc/config/i386/mingw32.h
gcc/config/i386/msformat-c.c [new file with mode: 0644]
gcc/config/i386/t-cygming
gcc/doc/extend.texi
gcc/doc/tm.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/format/attr-1.c
gcc/testsuite/gcc.dg/format/attr-2.c
gcc/testsuite/gcc.dg/format/attr-3.c
gcc/testsuite/gcc.dg/format/attr-4.c
gcc/testsuite/gcc.dg/format/attr-7.c
gcc/testsuite/gcc.dg/format/c90-printf-3.c
gcc/testsuite/gcc.dg/format/c90-scanf-4.c
gcc/testsuite/gcc.dg/format/c99-printf-3.c
gcc/testsuite/gcc.dg/format/format.h
gcc/testsuite/gcc.dg/format/miss-1.c
gcc/testsuite/gcc.dg/format/miss-3.c
gcc/testsuite/gcc.dg/format/miss-4.c
gcc/testsuite/gcc.dg/format/miss-5.c
gcc/testsuite/gcc.dg/format/miss-6.c
gcc/testsuite/gcc.dg/format/ms_array-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_attr-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_attr-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_attr-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_attr-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_attr-7.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_bitfld-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_branch-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_c90-printf-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_c90-printf-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_c90-printf-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_c90-scanf-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_c90-scanf-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_c90-scanf-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_c90-scanf-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_c90-scanf-5.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_c90-strftime-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_c90-strftime-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_c94-printf-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_c94-scanf-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_c99-printf-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_c99-printf-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_c99-printf-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_c99-scanf-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_c99-scanf-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_c99-scanf-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_c99-scanf-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_c99-strftime-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_c99-strftime-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_cast-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_miss-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_miss-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_miss-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_miss-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_miss-5.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_miss-6.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_multattr-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_multattr-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_multattr-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_no-exargs-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_no-exargs-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_no-y2k-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_nonlit-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_nonlit-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_nonlit-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_nul-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_nul-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_null-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_plus-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_sec-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_unnamed-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_va-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/ms_zero-length-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/multattr-1.c
gcc/testsuite/gcc.dg/format/multattr-2.c
gcc/testsuite/gcc.dg/format/null-1.c
gcc/testsuite/gcc.dg/format/sys_format.c [new file with mode: 0755]