Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Michael S Newsgroups: comp.lang.c Subject: Re: C23 thoughts and opinions Date: Sun, 26 May 2024 19:50:40 +0300 Organization: A noiseless patient Spider Lines: 30 Message-ID: <20240526195040.00001480@yahoo.com> References: <7d0e8f25-a8ba-4995-9b90-ff35f85d423f@gmail.com> <20240525142325.517@kylheku.com> <871q5o29af.fsf@nosuchdomain.example.com> <20240526153913.00007f65@yahoo.com> <20240526180531.00007259@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Date: Sun, 26 May 2024 18:50:31 +0200 (CEST) Injection-Info: dont-email.me; posting-host="748cc89cfd4b455fba2588d67f703cb1"; logging-data="3503865"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+dJuV/BQu/VnsJb3wwy7sVp4vv1aXgZwk=" Cancel-Lock: sha1:mqKvNWH4CmErWOCOQQ25aVgkqU0= X-Newsreader: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-w64-mingw32) Bytes: 2591 On Sun, 26 May 2024 18:26:49 +0200 David Brown wrote: > On 26/05/2024 17:05, Michael S wrote: > > > > In my environment it applies to gcc, but not to g++. > > In order to force my g++ to compile for other language you have to > > tell it so explicitly. > > No, g++ treats extensions other than ".c" the same way as gcc. (I > tested to be sure this time!) Try : > > touch foo.f > gcc foo.f > g++ foo.f > > You'll get the same complaint - either from missing Fortran support > or a failure to build the Fortran program. Even "g++ foo.m" tries to > compile as Objective-C, not Objective-C++. > Yes, I paid attention that for suffix .f (and probably for .ada) gcc and g++ behave identically only after I posted my response. BTW, it seems to me that here behavior of gcc/g++ is different from gfortran. If I am not mistaken, gfortran by default treats extension .f as "old FORTRAN" and extension .f90 as "new Fortran". But I can be wrong about it, New Fortran is not something I compile regularly and old FORTRAN is not something that I compile ever.