🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1983

Object and functions with the same name

#1983
From: Bjorn Engsig
Date: Thu, 15 Nov 1990 11:18
24 lines
1273 bytes
Is the following program with sources in two files strictly conforming,
and where in the ANSI standard are these issues discussed?

--- file1.c ---
#include <stdio.h>
int something = 12345;
extern void dothis();
main(int ac, char **av)
{ dothis(); printf("something = %d\n",something); }
--- file2.c ---
void something() { ; }
void dothis()    { something(); }
---------------

Actually, this question arises from the fact, that you could overlook
the existence of a function with a certain name in your libraries (or
the compiler vendor uses one internally, that isn't documented and doesn't
begin with _), and you then define an object with global linkage with the same
name.
-- 
Bjorn Engsig,         E-mail: bengsig@oracle.com, bengsig@oracle.nl
ORACLE Corporation    Path:   uunet!orcenl!bengsig

            "Stepping in others footsteps, doesn't bring you ahead"
Technical Details
Message-ID: <1118@nlsun1.oracle.nl>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!hp4nl!orcenl!bengsig

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!hp4nl!orcenl!bengsig
From: bengsig@oracle.nl (Bjorn Engsig)
Newsgroups: comp.std.c
Subject: Object and functions with the same name
Message-ID: <1118@nlsun1.oracle.nl>
Date: 15 Nov 90 11:18:32 GMT
Reply-To: bengsig@oracle.nl (Bjorn Engsig)
Organization: Oracle Europe, The Netherlands
Lines: 24