Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!uwvax!topaz!bentley!kwh From: kwh@bentley.UUCP (KW Heuer) Newsgroups: net.lang.c Subject: Re: Float Double Parameters; extern/static scope Message-ID: <713@bentley.UUCP> Date: Wed, 16-Apr-86 10:30:50 EST Article-I.D.: bentley.713 Posted: Wed Apr 16 10:30:50 1986 Date-Received: Fri, 18-Apr-86 06:02:43 EST References: <1377@lll-crg.ARpA> Organization: AT&T Bell Laboratories, Liberty Corner Lines: 30 In article <1377@lll-crg.ARpA> brooks@lll-crg.ARpA (Eugene D. Brooks III) writes: >The reason for keeping the conversion in is purely historical. >Its called those old dusty decks (sorry, files). The way that >the proposed ANSI standard deals with the problem, introduce >function prototypes, seems like a reasonable way to provide >efficiency for those who need it while at the same time not >breaking old code. I haven't seen the proposed standard, but from the conversation so far I gather that "f(x) float x; { ... }" will involve widening whereas the new syntax "f(float x) { ... }" will not. (And likewise "extern f(float)" is the signal to the compiler that the caller should not widen the argument.) Hmm, I'd say things are going to be a bit confusing for a while, but it's not easy to phase in a new idea. (I presume the old syntax will be dropped eventually, like the "=+" anachronisms.) What's the word on extern vs. static scope for external identifiers? Last I heard, there was some talk about changing the default from extern to static, but I think it got dropped for compatibility reasons. (Also, C++ was supposed to have static as a default, but Bjarne had to revert back to extern to maintain peaceful coexistence with C.) I think this modification should be phased in, too; the first step would be to issue a warning on an external definition like "int i = 4;" and "void f() {...}" (warning: extern scope assumed) and force the user to specify either "static int i = 4;" and "static void f() {...}", or "extern int i; int i = 4;" and "extern void f(); void f() {...}", whichever was intended. Then the default could be changed (warning: static scope assumed) and finally the warning could be dropped. I'd like to see this introduced with the ANSI standard. Karl W. Z. Heuer (ihnp4!bentley!kwh), The Walking Lint