From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a50a3c40267219cc X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-21 19:10:43 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn4feed!worldnet.att.net!135.173.83.71!wnfilter1!worldnet-localpost!bgtnsc06-news.ops.worldnet.att.net.POSTED!not-for-mail From: "David Thompson" Newsgroups: comp.lang.ada References: <9qf6pp$36a$1@nh.pace.co.uk> <3BCB673A.11FD06D@boeing.com> Subject: Re: The caselessness is one of the things I like best! X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Message-ID: Date: Mon, 22 Oct 2001 02:10:43 GMT NNTP-Posting-Host: 12.89.145.89 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc06-news.ops.worldnet.att.net 1003716643 12.89.145.89 (Mon, 22 Oct 2001 02:10:43 GMT) NNTP-Posting-Date: Mon, 22 Oct 2001 02:10:43 GMT Organization: AT&T Worldnet Xref: archiver1.google.com comp.lang.ada:15008 Date: 2001-10-22T02:10:43+00:00 List-Id: Jeffrey Carter wrote : ... > I have used C compilers that do not give warnings for undeclared > variables by default; they are silently created as type int. I don't > know if this is still legal for standard C. > Not variables. It has never been legal, even in early Unix C, to have undeclared variables. What was legal before and in C89 was to declare a variable without specifying the type, or a function without specifying the return type, and it defaulted to (signed) int. Usually this meant specifying the storage-class instead, but ISTR at least some compilers did allow at least at file-scope (and maybe in a struct) a declaration consisting only of the identifier or declarator. This is called "implicit int" and is removed in C99, and in C++. It was legal before and in C89 to use a _function_ name without a declaration and it was treated as if declared "int x()", that is, function of unspecified but non-default-promotable non-variadic arguments returning int. This also is removed in C99, and in C++. (In both cases it was probably the omission from C++ that made it politically acceptable for WG14/J11 to drop them from C, even though these changes break significant existing and in the former case arguably reasonable code, normally a taboo.) -- - David.Thompson 1 now at worldnet.att.net