🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: dnet.general
Article #1915

void* in function prototype in ANSI C

#1915
From: Andreas Luik
Date: Fri, 22 Sep 1989 12:44
28 lines
1286 bytes

Hallo C-Hacker,

ich habe ein Problem: Ist das folgende kleine C-Programm legal in
ANSI C, d. h. ist es richtig, wenn ein Compiler die Meldung bringt:

    Warning: assignment of incompatible types in line 7

Das File sieht so aus:

int func(char *cp, int i);

void main ()
{
    int (*fp)(void *ip, int i);

    fp = func;

    exit (0);
}

Was meint ihr?

Andreas Luik                    Domain: luik@isaak.isa.de
ISA GmbH                        UUCP:   luik@isaak.uucp
Azenberstr. 35                  Bang:   ...!uunet!unido!isaak!luik
7000 Stuttgart (West-Germany)   BITNET: luik%isaak.uucp@unido.bitnet
Technical Details
Message-ID: <1558@isaak.UUCP>
Path: arc1-ca.pugleaf.net!gmdzi!unido!isaak!isaak.uucp!luik

Show Full Headers
Complete Article Headers
X-Google-Language: GERMAN,ASCII-7-bit
X-Google-Thread: 10dc06,b91310e90d986cbc,start
X-Google-Attributes: gid10dc06,public
X-Google-ArrivalTime: 1989-09-23 04:45:49 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!isaak!isaak.uucp!luik
From: luik@isaak.uucp (Andreas Luik)
Newsgroups: dnet.general
Subject: void* in function prototype in ANSI C
Keywords: ANSI C, gcc, void*, function prototypes
Message-ID: <1558@isaak.UUCP>
Date: 22 Sep 89 12:44:55 GMT
Sender: news@isaak.UUCP
Reply-To: luik@isaak.uucp (Andreas Luik)
Followup-To: dnet.general
Distribution: dnet
Organization: ISA GmbH, Stuttgart, West-Germany
Lines: 28
Posted: Fri Sep 22 13:44:55 1989