🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #569

GCC 1.35 - bug with prototypes?

#569
From: "Robert S. French"
Date: Sat, 02 Sep 1989 20:14
34 lines
1245 bytes
This has probably been asked before, but I haven't seen an answer...

The following program compiles fine:

    int foo(unsigned short a);

    foo(unsigned short a)
    {
    }

while this program fails with an error:

    int foo(unsigned short a);

    foo(a)
        unsigned short a;
    {
    }

gcc version 1.35
 /mit/gnu/vaxlib/gcc-cpp -v -undef -D__GNUC__ -Dvax -Dunix -D__vax__ -D__unix__
/tmp/foo.c /tmp/cc012693.cpp
GNU CPP version 1.35
 /mit/gnu/vaxlib/gcc-cc1 /tmp/cc012693.cpp -quiet -dumpbase /tmp/foo.c -version
-o /tmp/cc012693.s
GNU C version 1.35 (vax) compiled by GNU C version 1.35.
/tmp/foo.c: In function foo:
/tmp/foo.c:5: argument `a' doesn't match function prototype
/tmp/foo.c:5: a formal parameter type that promotes to `int'
/tmp/foo.c:5: can match only `int' in the prototype


		Rob
Technical Details
Message-ID: <8909022014.AA12696@OLIVER.MIT.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ATHENA.MIT.EDU!rfrench

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ATHENA.MIT.EDU!rfrench
From: rfrench@ATHENA.MIT.EDU ("Robert S. French")
Newsgroups: gnu.gcc.bug
Subject: GCC 1.35 - bug with prototypes?
Message-ID: <8909022014.AA12696@OLIVER.MIT.EDU>
Date: 2 Sep 89 20:14:58 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 34