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


"Joseph S. Myers" <joseph@codesourcery.com> wrote on 25.02.2008 19:48:56:

Ok, I am back at work again. AFAIK does cygwin needs this just for the 
case somebody uses cygwin gcc as mingw compiler. Otherwise they need just 
the variable to be able link. Cygwin uses gnu format attributes by 
default, isn't it?
I changed your suggestions and patched the flags of strftime for ms 
format.

> Note that this part of the patch will need reviewing by a MinGW 
> maintainer.

Danny, could you do that?

Is this ok for apply to trunk?

2008-03-10      Kai Tietz  <kai.tietz@onevision.com>

        * 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.

ChangeLog for testcase

2008-03-10  Kai Tietz  <kai.tietz@onevision.com>

        * 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.

Kai



|  (\_/)  This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.

Attachment: mingw-msformat.txt
Description: Text document


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