🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #51134

define an extern fonction

#51134
From: Marc GINGOLD B528p15A 22965
Date: Sat, 03 Jul 1993 15:50
16 lines
1055 bytes
gcc and g++ allow you to define an extern foction like this:
extern int test(char *c)
{
 return c==(char*)0;
};

Strange, isn't it. You tell this fonction to be extern and you
write it.
Is it a gcc/g++ feature, a bug, or an ANSI-C feature ?
This program compiles without warning, even with -Wall.
And you can't write:
extern int val=9;

BTW, it can be very useful with g++, to allow C fonctions to call
C++ fonctions
Please, anser me by mail.
Technical Details
Message-ID: <1993Jul03.155037.7079@nenuphar.saclay.cea.fr>
Path: arc1-ca.pugleaf.net!gmd.de!Germany.EU.net!mcsun!julienas!nenuphar.saclay.cea.fr!

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,fc0453ee5436702f,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-07-03 09:13:48 PST
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!gmd.de!Germany.EU.net!mcsun!julienas!nenuphar.saclay.cea.fr!
From: marc@tobit.saclay.cea.fr (Marc GINGOLD B528p15A 22965)
Subject: define an extern fonction
Sender: @nenuphar.saclay.cea.fr
Message-ID: <1993Jul03.155037.7079@nenuphar.saclay.cea.fr>
Date: Sat, 03 Jul 1993 15:50:37 GMT
Nntp-Posting-Host: tobit.saclay.cea.fr
Organization: CEA CE Saclay
Keywords: extern
Lines: 16