ANSI C standard will allow extensions

Sam Kendall kendall at wjh12.UUCP
Sat Oct 13 11:05:50 AEST 1984


Several articles have objected to the 6-character external identifier
limit thinking that it is an absolute limit on compilers.

> I think you should definetly have the standard allow long external variable
> names. Limiting them to 6 characters would have a number of bad effects:
>   ...
>   2) Compiler writers would *not* follow the standard. The problem with
>      this is that everyone will violate it in a different way. Some
>      compilers will support 31 char limits, some 64, some 255. In other
>      words, the standard will not be used and would therefore be a
>      failure.

Luckily, it's not quite as bad as that.  The ANSI C standard, unlike the
Ada standard, will allow extensions.  The standard is simply to specify
what a program must be like if it hopes to be 100% portable;
implementors are not discouraged from adding to the language they
compile.  (And on the 6-character issue, since System V Release 2 and
4.2bsd both support indefinite-length identifiers and will presumably
continue to do so, programs can be somewhat portable even if they use
big names.)

	Sam Kendall	  {allegra,ihnp4,ima,amd}!wjh12!kendall
	Delft Consulting Corp.	    decvax!genrad!wjh12!kendall



More information about the Comp.lang.c mailing list