"a();" not a valid external declaration in pANS C.

Stephen J. Friedl friedl at vsi.COM
Tue Feb 7 17:42:30 AEST 1989


In article <46 at microsoft.UUCP> jangr at microsoft.UUCP (Jan Gray) writes:
>
> pANS C accepts "int a();" and "a() {}" but not "a();", which is valid K&R C.
> I am curious about the rationale behind this change.  Was it "nobody really
> uses that construct, and banning it simplifies the grammar"?

In article <2856 at epimass.EPI.COM>, jbuck at epimass.EPI.COM (Joe Buck) writes:
>
> Not only does nobody use that construct intentionally, but I've seen
> problems arise because of typos because of this construct.

I hate to tell you this folks, but this default-type-is-int is
indeed used in a wide body of C code.  Check with your local
archive site for recent the Obfuscated C contest entries.

     Steve :-)

-- 
Stephen J. Friedl        3B2-kind-of-guy            friedl at vsi.com
V-Systems, Inc.       I speak for you only      attmail!vsi!friedl
Santa Ana, CA  USA       +1 714 545 6442    {backbones}!vsi!friedl
Nancy Reagan on these *stupid* .signatures: "Enough already, OK?"



More information about the Comp.std.c mailing list