Float Double Parameters; extern/static scope

Frank Adams franka at mmintl.UUCP
Sat Apr 19 07:28:06 AEST 1986


In article <713 at bentley.UUCP> kwh at 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



More information about the Comp.lang.c mailing list