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: patch: mingw support for I32/I64 MS printf formatters to c-format.c


"Joseph S. Myers" <joseph@codesourcery.com> wrote on 12.04.2007 17:52:53:

> On Thu, 12 Apr 2007, Kai Tietz wrote:
> 
> > Why do you think we should ignore rather than override those 
attributes by
> > extending the dynamic_format_types mechanism ? AFAICS this is always a 

> > target
> > runtime issue, so that having a "system" and a none-"system" seems to 
be 
> > just
> > an unnecessary duplication. Isn't it ? If there is a need to have a 
> > doublicated
> > with different formatter rules, we could use also the 
TARGET_FORMAT_TYPES.
> 
> If a user is using a portable printf reimplementation to avoid problems 
> with what may or may not be supported by different systems (e.g. 
> snprintfv), they want the fixed GNU printf attribute.
> 
> If a user has a function which passes through to the system printf 
> function, they want the system printf attribute.
> 
> Both are useful.  Both should be supported with different attributes. 
The 
> only question is whether the new one should be system_printf or 
> gnu_printf.  If the new one is gnu_printf then you don't need special 
> handling for duplicated attributes (because existing system headers will 

> be using the "printf" attribute), if the new one is system_printf then 
you 
> do need that special handling.
> 
> The new one being system_printf keeps the existing semantics of GNU C 
the 
> same.  The new one being gnu_printf probably accords with the 
expectations 
> of more system headers, but the workaround for duplicate attributes 
should 
> largely avoid problems there.

Ok, than I will add to format_types_orig the new attributes "gnu_printf", 
"gnu_scanf", and "gnu_strftime" as duplicates.
I assume, that the target specific attributes have to be added by using 
TARGET_FORMAT_TYPES. Than I will override the
attributes those attributes mentioned in TARGET_OVERRIDE as { { 
"xyz_printf", "printf" }, ... }. I think this
should solve it.

Regards,
 i.A. Kai Tietz

------------------------------------------------------------------------------------------
  OneVision Software Entwicklungs GmbH & Co. KG
  Dr.-Leo-Ritter-StraÃe 9 - 93049 Regensburg
  Tel: +49.(0)941.78004.0 - Fax: +49.(0)941.78004.489 - www.OneVision.com
  Commerzbank Regensburg - BLZ 750 400 62 - Konto 6011050
  Handelsregister: HRA 6744, Amtsgericht Regensburg
  KomplementÃrin: OneVision Software Entwicklungs Verwaltungs GmbH
  Dr.-Leo-Ritter-StraÃe 9 â 93049 Regensburg
  Handelsregister: HRB 8932, Amtsgericht Regensburg - GeschÃftsfÃhrer: 
Ulrike DÃhler, Manuela Kluger


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