From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5490 invoked by alias); 18 Dec 2007 19:56:00 -0000 Received: (qmail 5482 invoked by uid 22791); 18 Dec 2007 19:55:59 -0000 X-Spam-Check-By: sourceware.org Received: from nz-out-0506.google.com (HELO nz-out-0506.google.com) (64.233.162.224) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 18 Dec 2007 19:55:36 +0000 Received: by nz-out-0506.google.com with SMTP id i11so1496088nzh.26 for ; Tue, 18 Dec 2007 11:55:34 -0800 (PST) Received: by 10.65.115.4 with SMTP id s4mr2009228qbm.37.1198007734432; Tue, 18 Dec 2007 11:55:34 -0800 (PST) Received: by 10.65.53.19 with HTTP; Tue, 18 Dec 2007 11:55:34 -0800 (PST) Message-ID: <9c03c2dd0712181155v386b2fdct43062e7f6df86ea9@mail.gmail.com> Date: Tue, 18 Dec 2007 21:14:00 -0000 From: "Danny Smith" To: "Kai Tietz" Subject: Re: Ping - old patch from April - mingw support for I32/I64 MS printf formatters to c-format.c Cc: "Joseph S. Myers" , "GCC Patches" , NightStrike In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-12/txt/msg00896.txt.bz2 Hello Kai > This patch is tested for *-pc-mingw32 (using MS %I32 and %I64) and for > i686-pc-cygwin (for the gnu variant). > > ChangeLog: > > 2007-12-18 Kai Tietz > > * gcc/doc/extend.texi: Extent user description. > * gcc/doc/tm.texi: (TARGET_OVERRIDES_FORMAT_ATTRIBUTES, > TARGET_OVERRIDES_FORMAT_ATTRIBUTES_COUNT): New. > * gcc/c-format.c: (replace_formatter_name_to_system_name): New > method to map target format attributes as system. > (decode_format_attr): Translate system format attribute names. > (format_types_orig): Prefix gnu attributes by "gnu_". > (ARGET_OVERRIDES_FORMAT_ATTRIBUTES): New extern for > target specific system format attribute override. > (gnu_target_overrides_format_attributes): Default overrides for > gnu. > * gcc/c-format.h: (target_ovr_attr): New type for system attribute > mapping. > * gcc/config/i386/mingw32.h: (TARGET_OVERRIDES_FORMAT_ATTRIBUTES, > TARGET_OVERRIDES_FORMAT_ATTRIBUTES_COUNT, > TARGET_FORMAT_TYPES, TARGET_N_FORMAT_TYPES): New. > * gcc/config/i386/i386.c: Add ms-formatter definitions. > * gcc/testsuite/gcc.dg/sys_formatter.c: New test case. > Some quibles: MS uses the "%I" flag as a length specifier for size_t/ptrdiff_t http://msdn2.microsoft.com/en-us/library/tcxf1dw6(VS.80).aspx Your patch still retains "I" in its gnu extension sense. MS printf will get confused by it. TODO: MS printf does not handle "%hh" or "%ll" correctly and does not even recognize long double. Also what about MS extension %hc' and '%lc'. Danny