Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!princeton!udel!rochester!bbn!husc6!linus!philabs!micomvax!musocs!mcgill-vision!mouse From: mouse@mcgill-vision.UUCP Newsgroups: comp.lang.c Subject: Re: bug (?) in 4.(2,3)? Message-ID: <896@mcgill-vision.UUCP> Date: Tue, 22-Sep-87 01:21:58 EDT Article-I.D.: mcgill-v.896 Posted: Tue Sep 22 01:21:58 1987 Date-Received: Sat, 3-Oct-87 06:09:13 EDT References: <462@eplrx7.UUCP> Organization: McGill University, Montreal Lines: 24 Keywords: external declaration of a system call In article <462@eplrx7.UUCP>, lad@eplrx7.UUCP (Lawrence Dziegielewski) writes: > [re conflict between a variable "fstat" and the syscall] > [program with fstat variable dies: stdio uses fstat() the syscall] You are using a reserved identifier (fstat) in a way which does not match what it is reserved to mean. Sometimes you will get away with this (eg, same program, change "fstat" to "mknod" and it will probably work), sometimes you won't. (By a "reserved" identifier I mean one which has a meaning assigned by the system, not reserved in the sense of a language keyword like "sizeof" or "while".) > If this is indeed a problem for Berkley, then the compiler ought flag > the external declaration as a redeclaration, Why? You haven't redeclared fstat. The *loader* should warn, but currently can't because all it sees in stdio is "reference to external undefined" which it can't check against "definition of external data" - it doesn't know it should be "...external text". If the compiler and loader cooperated, the loader could complain about satisfying a text segment reference with a data segment symbol. der Mouse (mouse@mcgill-vision.uucp)