Is this kosher?

6600pete at hub.UUCP 6600pete at hub.UUCP
Thu Dec 7 06:06:33 AEST 1989


>From article <21122 at mimsy.umd.edu>, by chris at mimsy.umd.edu (Chris Torek):
> 	f() { char array[12]; ... }

What's the use of declaring such a thing beyond passing a pointer to it to
another module? (BTW, IMHO, this one use of the declaration runs counter to
intuitive programming practices because it peppers the .c file with things
that go in the binary executable image file instead of on the stack.)

> Some entities---global variables and
> all functions---*always* have static duration.  The confusion comes in
> here, as the `static' keyword can be applied to them, this time
> changing not their duration (which is already static) but rather their
> linkage.  Static globals get internal linkage, which means that their
> names do not appear to exist outside the one file...

IMHO, this is a weakness in the standard. Has it been bashed out before?
-------------------------------------------------------------------------------
Pete Gontier   : InterNet: 6600pete at ucsbuxa.ucsb.edu, BitNet: 6600pete at ucsbuxa
Editor, Macker : Online Macintosh Programming Journal; mail for subscription
Hire this kid  : Mac, DOS, C, Pascal, asm, excellent communication skills



More information about the Comp.lang.c mailing list