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,b30bd69fa8f63cb2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-13 08:24:40 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!news-FFM2.ecrc.net!fu-berlin.de!uni-berlin.de!213.200.246.247!not-for-mail From: Vinzent Hoefler Newsgroups: comp.lang.ada Subject: Re: C bug of the day Date: Fri, 13 Jun 2003 17:23:09 +0200 Organization: JeLlyFish software Message-ID: References: <1054751321.434656@master.nyc.kbcfp.com> <20619edc.0306121040.2fea0695@posting.google.com> <3EE8CE83.8090001@attbi.com> NNTP-Posting-Host: 213.200.246.247 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: fu-berlin.de 1055517879 18148161 213.200.246.247 (16 [175126]) X-Newsreader: Forte Agent 1.8/32.548 Xref: archiver1.google.com comp.lang.ada:39126 Date: 2003-06-13T17:23:09+02:00 List-Id: kanze@gabi-soft.fr wrote: >"Robert I. Eachus" wrote in message >news:<3EE8CE83.8090001@attbi.com>... > >> For example, if GNAT tells me that no function Foo is directly >> visible, but there is one at Ada.Bar.Foo, there are two cases. One >> is, "Of course I meant that one, just thought I had a use clause." >> The other of course is that I was thinking of some other function >> entirely. I would hate to have a compiler that "fixed" the reference. >> At least 90% of the time it would be right, but the compiler has no >> way to know which 90% that is. > >I don't know of any compiler which does that, in any language. Well, at least the older C-versions sort of did that (C99 now requires proper prototypes, IIRC, so this sort of error is more unlikely now). But writing |printf (4711); was perfectly legal and the linker didn't complain, because a symbol with the appropriate name was defined. Well, running the executable than would have had possibly quite desastrous results. Vinzent. --=20 Parents strongly cautioned -- this posting is intended for mature audiences over 18. It may contain some material that many parents would not find suitable for children and may include intense violence, sexual situations, coarse language and suggestive dialogue.