Path: 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 Is the following program with sources in two files strictly conforming, and where in the ANSI standard are these issues discussed? --- file1.c --- #include 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"