Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 May 1995 08:32:18 -0700 (PDT)
From:      "Rodney W. Grimes" <rgrimes@gndrsh.aac.dev.com>
To:        wollman@halloran-eldar.lcs.mit.edu (Garrett Wollman)
Cc:        FreeBSD-hackers@FreeBSD.org (FreeBSD hackers)
Subject:   Re: cvs commit: src/sys/i386/isa aha1742.c fd.c if_le.c scd.c wd.c
Message-ID:  <199505091532.IAA05868@gndrsh.aac.dev.com>
In-Reply-To: <9505091519.AA09826@halloran-eldar.lcs.mit.edu> from "Garrett Wollman" at May 9, 95 11:19:02 am

next in thread | previous in thread | raw e-mail | index | archive | help
[Moved onto the -hackers list...]

> 
> <<On Tue, 9 May 1995 05:26:07 -0700, "Rodney W. Grimes" <rgrimes@freefall.cdrom.com> said:
> 
> >   Fix -Wformat warnings, still need to do something about %b and pointer
> >   type args.
> 
> You will eventually run into `%r' as well.  It may be better to fix
> GCC to recognize these two, if there's someone out there who
> understands GCC internals well enough.

Yea, I ran into %r, see other mail...

I know how to fix GCC, I did the work to initially add the q size option
for the quad_t support before we upgraded to a version of gcc that included
it.

It would take me all of 10 minutes to add %b and %r, but then user land
programs would be allowed to use these, and with your comment below that
would *not* be a problem on FreeBSD, but it would be if someone ever
ported the code.

> 
> Both would be nice features to have in the libc printf as well, but I
> don't know if ANSI allows it (probably).

I seem to recall some user land code using %b.. hummm... ifconfig, that
was it..

hookturn# cd ifconfig
/usr/src/sbin/ifconfig 
hookturn# grep %b *
ifconfig.c: * Print a value a la the %b format of the kernel's printf
hookturn# 

Humm... wonder how many other private %b format routines we have
floating around.

If no one objects, or finds that ansi and/or posix restricts me from
adding %b and %r to printf I will go do it, and update gcc to not
complain about them.  

-- 
Rod Grimes                                      rgrimes@gndrsh.aac.dev.com
Accurate Automation Company                   Custom computers for FreeBSD



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199505091532.IAA05868>