🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #1224

Re: gcc v2.2.2 unsigned prototype bug

#1224
From: scott machaffie
Date: Mon, 28 Sep 1992 13:57
25 lines
1269 bytes
sm@cvedc.prime.com (scott machaffie) writes:

>The following (ANSI-legal, according to my understanding of ANSI) code
>generates an error message in gcc2.2.2:

>void foo(unsigned int, unsigned int, unsigned int, unsigned long);

>void foo(uchar_error, ushort_error, uint_okay, ulong_okay)
>unsigned char   uchar_error;
>unsigned short  ushort_error;
>unsigned int    uint_okay;
>unsigned long   ulong_okay;
>{
>	return;
>}

>gcc generates an error message for "uchar_error" and "ushort_error".

Actually, this is correct (after re-reading K&RII).  However, the following
prototype should generate a warning message when used with the function
above, but doesn't:

void foo(unsigned char, unsigned short, unsigned int, unsigned long);

Scott MacHaffie
Technical Details
Message-ID: <1992Sep28.135709.9583@cvedc.prime.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!cvedc.prime.com!sm
References: <1992Sep25.155237.1916@cvedc.prime.com>

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!cvedc.prime.com!sm
From: sm@cvedc.prime.com (scott machaffie)
Subject: Re: gcc v2.2.2 unsigned prototype bug
Message-ID: <1992Sep28.135709.9583@cvedc.prime.com>
Keywords: unsigned prototypes
Sender: gnulists@ai.mit.edu
Organization: Computervision R&D, Beaverton OR
References: <1992Sep25.155237.1916@cvedc.prime.com>
Distribution: gnu
Date: Mon, 28 Sep 1992 13:57:09 GMT
Approved: bug-gcc@prep.ai.mit.edu
Lines: 26