kwh@bentley.UUCP (KW Heuer) (04/16/86)
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
franka@mmintl.UUCP (Frank Adams) (04/18/86)
In article <713@bentley.UUCP> kwh@bentley.UUCP writes: >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 You left out the middle stage, where not specifying anything is an error, not a warning. Actually, I would be quite happy to leave it at that stage. Frank Adams ihnp4!philabs!pwa-b!mmintl!franka Multimate International 52 Oakland Ave North E. Hartford, CT 06108