Re: printf enhancement

2010-01-22 Thread Nils Pipenbrinck
Alfred M. Szmidt wrote:
>Since it is possible to use the 0b prefix to specify a binary
>number in GCC/C++, will there be any resistance to add %b format
>specifier to the printf family format strings?
>
> You can do that yourself by using the hook facility for printf, see
> (libc) Customizing Printf in the GNU C library manual; this is a GNU
> extention and not supported by ISO C.
>   
If you add support for it, you may break code that already registers %b
using this functionality, no?

Cheers,
Nils



Re: printf enhancement

2010-01-22 Thread Alfred M. Szmidt
   Since it is possible to use the 0b prefix to specify a binary
   number in GCC/C++, will there be any resistance to add %b format
   specifier to the printf family format strings?

You can do that yourself by using the hook facility for printf, see
(libc) Customizing Printf in the GNU C library manual; this is a GNU
extention and not supported by ISO C.


Re: printf enhancement

2010-01-22 Thread Kaveh R. GHAZI
On Fri, 22 Jan 2010, Piotr Wyderski wrote:

> Paolo Carlini wrote:
>
> > The C library, to which library printf belongs, is not part of the GCC
> > project.
>
> In that case it certainly isn't a GCC issue.

Assuming this feature is accepted in glibc, you'll want to update GCC's
-Wformat flag.



Re: printf enhancement

2010-01-22 Thread Piotr Wyderski
Paolo Carlini wrote:

> The C library, to which library printf belongs, is not part of the GCC
> project.

In that case it certainly isn't a GCC issue.


Re: printf enhancement

2010-01-22 Thread Paolo Carlini
On 01/22/2010 12:31 PM, Piotr Wyderski wrote:
> You sure? Isn't the implementation of printf formatting engine a part
> of GCC support libraries
The C library, to which library printf belongs, is not part of the GCC
project.

Paolo.



Re: printf enhancement

2010-01-22 Thread Piotr Wyderski
Paolo Carlini wrote:

> This has absolutely nothing to do with GCC and its development, you
> understand.

You sure? Isn't the implementation of printf formatting engine a part
of GCC support libraries and doesn't adding an extension to it
belong to the category "development"?


Re: printf enhancement

2010-01-22 Thread Paolo Carlini
On 01/22/2010 12:01 PM, Piotr Wyderski wrote:
> Since it is possible to use the 0b prefix
> to specify a binary number in GCC/C++,
> will there be any resistance to add %b
> format specifier to the printf family format
> strings?
>   
This has absolutely nothing to do with GCC and its development, you
understand.

Paolo.


printf enhancement

2010-01-22 Thread Piotr Wyderski
Since it is possible to use the 0b prefix
to specify a binary number in GCC/C++,
will there be any resistance to add %b
format specifier to the printf family format
strings?

Best regards
Piotr Wyderski