Deutsch English Français Italiano |
<20240313141248.00003cbe@yahoo.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!2.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Michael S <already5chosen@yahoo.com> Newsgroups: comp.lang.c Subject: Re: Word For Today: =?UTF-8?Q?=E2=80=9CUglification=E2=80=9D?= Date: Wed, 13 Mar 2024 14:12:48 +0200 Organization: A noiseless patient Spider Lines: 39 Message-ID: <20240313141248.00003cbe@yahoo.com> References: <uso6or$3t3jn$3@dont-email.me> <usopec$4eob$1@dont-email.me> <usort1$4t2r$1@dont-email.me> <20240312003531.349@kylheku.com> <wwvwmq7x4ex.fsf@LkoBDZeT.terraraq.uk> <usp9m5$7it7$1@dont-email.me> <20240312174600.5b88613545da9f667e06a4c6@g{oogle}mail.com> <uspqa4$bfao$1@dont-email.me> <20240312180904.ac3a5856df424c396689db3e@g{oogle}mail.com> <uspt5n$c2bg$1@dont-email.me> <20240312114213.182@kylheku.com> <usql0p$hk2k$1@dont-email.me> <878r2n839m.fsf@nosuchdomain.example.com> <uss3kr$ud17$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Info: dont-email.me; posting-host="e06ec37471ddbf3b56cad511bd7ef1c1"; logging-data="919684"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+jxp7aVhtt/VWVO74znQGmMZguqdC5zAQ=" Cancel-Lock: sha1:fEKAJWyFhfcfi7XXAoJEKw+PGYM= X-Newsreader: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-w64-mingw32) Bytes: 2910 On Wed, 13 Mar 2024 11:45:31 +0000 bart <bc@freeuk.com> wrote: > > > This is something new I saw today: suppose I have hello.c in a > directory (hello.c uses '#include <stdio.h>'). > > If I create an empty file called 'stdio.h', then 4 compilers I tried > all picked up that file instead of their official stdio.h. That looks > a dangerous practice to me. > > It also seems, for a <...> file, to ignore the official repository > and look first within the user's project. So what exactly is the > difference between <...> and "..."? Is it just an extra set of backup > paths to look if it can't find anything within the user's files? > > (The 5th compiler I tried ignored it and worked as normal; that was > mine. I can make it fail using my '-ext' option to look elsewhere > than the official headers location. I don't make a distinction > between <...> and "...".) > > I just tried three compilers and [in absence of -I options] all 3 work as expected, i.e. ignored stdio.h in current directory. None of the three was of the variety that you appear to prefer. Mine's are mundane stuff. However all three took local file when I had given them an option -I. Not sure what to make of this. Whatever happens with non-default options is probably in "implementation-defined" domain as far as the C Standard is concerned, but I still expected that such common option as -I would not affect standard headers.