is "extern" ambiguous

DBrown.CSC_SDO at Hi-Multics.ARPA DBrown.CSC_SDO at Hi-Multics.ARPA
Wed Apr 4 05:38:00 AEST 1984


  Hmmn...
  Well, I did phrase that as if I wanted to say "static int foo()"
inside a function, didn't I.
  Perhaps the question should be: can I say
  main() {
	char *p, *capitalize_names();
	...
  }
  static char *capitalize_names(q) char *q; {
          ...

  without *either* static or extern declarations.
  My lint (not unexpectedly) gets upset when I tell it that a function
is both static and external.  I would not expect it to complain if I say
something is "function returning char pointer" and later add the fact
that it's "static".

  So I'll reask the question: does anyone have a compiler which
*requires* a static be declared extern?
  If they do I'll conclude dropping the "extern" in my declaration is
non-portable.
  If they don't, I'll conclude that the use of extern ::= static is the
non-portable construct.

  IN EITHER CASE I CONCLUDE AND PROPOSE THAT THE CONSTRUCT IS LEGAL C,
since at least one standard-conforming C compiler allows it.

  I like C as it stands, too!

  --dave



More information about the Comp.unix.wizards mailing list