Subject: Re: bin/578: cc's -Wformat doesn't grok q modifier
To: None <netbsd-bugs@sun-lamp.cs.berkeley.edu>
From: Ted Nolan SRI Ft Gordon <ted@ags.ga.erg.sri.com>
List: netbsd-bugs
Date: 11/18/1994 15:05:19
>>Description:
>	gcc -Wformat gripes about formats like %qd, which use the q
>	modifier.  But these work, and are necessary to print long
>	longs (which occur as quad_t in several syscall interfaces),
>	while -Wformat is very useful.  IMO -Wformat should agree with


I've wondered some since I began hearing about "long longs" and
"quads".  Wouldn't it make more sense for gcc to do:

	char	1 byte
	short	2 bytes
	int	4 bytes
	long	8 bytes

rather than inventing long longs?

As far as I know, this doesn't violate any C standard (I think the guarantee is

	char < short <= int <= long

), and we seemed to survive pretty well back in V7 days on the PDP11 with
int = 2 bytes and long = 4 bytes.

I realize this would break a lot of code (including much of my own, I'm sure),
but it seems it will have to be done eventually.  Is there any other reason
for not doing it?


				Ted Nolan