where do %j/uintmax_t stand in terms of standards? [WAS: Re: WARNS cleanup for ipfw

Johan Karlsson johan at freebsd.org
Sat Mar 6 09:32:22 PST 2004


[lets move this from ipfw@ to standars@ to get an answer]


On Sat, Mar 06, 2004 at 08:26 (-0800) +0000, Luigi Rizzo wrote:
> On Sat, Mar 06, 2004 at 12:19:22PM +0100, Johan Karlsson wrote:
> > Hi
> > 
> > the attached patch makes ipfw WARNS=2 clean by using the
> > %j/(uintmax_t) combo where so needed. If there are no
> > objections I intend to commit this patch.

First of all, %j/uintmax_t is used since uint64_t does not match
long long on all our platforms. Hence to print this without warning
we need to do this.

> 
> if align_uint64() is always cast to uintmax_t, why don't
> you define it to return the proper type instead ?

Since I only looked at removing the warnings I did not realize that
it is only used when printing. However, I do agree that this is a better
solution. I will make that change and run it through a make universe.

> 
> Also, where do %j/uintmax_t stand in terms of standards ?
> certainly the gcc in 4.x does not like them...

I have absolutly no idea. Can someone here at standards@ answer 
this question?

take care
/Johan K

-- 
Johan Karlsson		mailto:johan at FreeBSD.org


More information about the freebsd-standards mailing list