🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #52728

Wanted: verdict on gcc-2.1's -Wconversion versus unsigneds

#52728
From: Arthur David Olson
Date: Thu, 28 May 1992 12:46
53 lines
2373 bytes
If you're a language lawyer or a gcc guru and can explain the diagnostic
messages in the attached typescript, I'd appreciate hearing from you by
electronic mail.  The output was produced on a SPARCstation 2,
where (sizeof(char)==1&&sizeof(short)==2&&sizeof(int)==4&&sizeof(long)==4).
-- 
		Arthur David Olson	ado@elsie.nci.nih.gov
		ADO and Elsie are Ampex and Borden trademarks

	Script started on Thu May 28 08:42:43 1992
	bossie$ cat -n try.c
	     1	extern void	ucarg(unsigned char);
	     2	extern void	usarg(unsigned short);
	     3	extern void	uiarg(unsigned int);
	     4	extern void	ularg(unsigned long);
	     5	
	     6	unsigned char	uc;
	     7	unsigned short	us;
	     8	unsigned int	ui;
	     9	unsigned long	ul;
	    10	
	    11	void
	    12	func()
	    13	{
	    14		ucarg(uc);
	    15		usarg(uc);
	    16		uiarg(uc);
	    17		ularg(uc);
	    18		ucarg(us);
	    19		usarg(us);
	    20		uiarg(us);
	    21		ularg(us);
	    22		ucarg(ui);
	    23		usarg(ui);
	    24		uiarg(ui);
	    25		ularg(ui);
	    26		ucarg(ul);
	    27		usarg(ul);
	    28		uiarg(ul);
	    29		ularg(ul);
	    30	}
	bossie$ /usr/local/bin/gcc -c -Wconversion try.c
	try.c: In function `func':
	try.c:16: warning: argument passed as unsigned due to prototype
	try.c:17: warning: argument passed as unsigned due to prototype
	try.c:20: warning: argument passed as unsigned due to prototype
	try.c:21: warning: argument passed as unsigned due to prototype
	try.c:22: warning: argument passed as signed due to prototype
	try.c:23: warning: argument passed as signed due to prototype
	try.c:26: warning: argument passed as signed due to prototype
	try.c:27: warning: argument passed as signed due to prototype
	bossie$ exit

	script done on Thu May 28 08:43:01 1992
Technical Details
Message-ID: <1992May28.124631.375@alw.nih.gov>
Path: arc1-ca.pugleaf.net!sparky!uunet!nih-csl!bossie!ado

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,dfac91ca03d21ebd,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1992-05-28 04:03:14 PST
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!sparky!uunet!nih-csl!bossie!ado
From: ado@bossie.nci.nih.gov (Arthur David Olson)
Subject: Wanted: verdict on gcc-2.1's -Wconversion versus unsigneds
Message-ID: <1992May28.124631.375@alw.nih.gov>
Followup-To: poster
Sender: postman@alw.nih.gov (AMDS Postmaster)
Organization: National Institutes of Health
Date: Thu, 28 May 1992 12:46:31 GMT
Lines: 53