Deutsch English Français Italiano |
<vsmlc4$1c39t$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: David Brown <david.brown@hesbynett.no> Newsgroups: comp.lang.c Subject: Re: "A diagram of C23 basic types" Date: Thu, 3 Apr 2025 20:51:48 +0200 Organization: A noiseless patient Spider Lines: 31 Message-ID: <vsmlc4$1c39t$1@dont-email.me> References: <87y0wjaysg.fsf@gmail.com> <vsj1m8$1f8h2$1@dont-email.me> <vsj2l9$1j0as$1@dont-email.me> <vsjef3$1u4nk$1@dont-email.me> <vsjg6t$20pdb$1@dont-email.me> <vsjjd1$23ukt$1@dont-email.me> <vsjkvb$25mtg$1@dont-email.me> <vsjlkq$230a5$2@dont-email.me> <20250402232443.00003a7d@yahoo.com> <vslilm$8mfb$1@dont-email.me> <vsm05b$k0b7$1@dont-email.me> <85y0whjdw3.fsf@nosuchdomain.example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 03 Apr 2025 20:51:49 +0200 (CEST) Injection-Info: dont-email.me; posting-host="db4f14c1cbc89984b58631ea9e632a09"; logging-data="1445181"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+l2Y2BW56b1C/w4fy4Z5t+UU6OrHRMxWA=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:NSMPeeOslTdupvtirDXN2wFFq9s= Content-Language: en-GB In-Reply-To: <85y0whjdw3.fsf@nosuchdomain.example.com> Bytes: 2631 On 03/04/2025 20:31, Keith Thompson wrote: > bart <bc@freeuk.com> writes: > [...] >> I understand C23 mode will be enabled by a compiler option (-std=c23); >> the same method could have been used to enable all std headers, and >> for that to be the default. > > The standard says exactly nothing about compiler options. "-std=c23" > is a convention used by *some* compilers (gcc and other compilers > designed to be compatible with it). > >> Hello World then becomes this one-liner: >> >> int main() {puts("Hello, World!");} > > A compiler could provide such an option as a non-conforming extension > with no change in the standard. I'm not aware that any compiler > has done so, or that there's been any demand for it. One reason > for the lack of demand might be that any code that depends on it > is not portable. (Older versions of MS Visual Studio create a > "stdafx.h" header, but newer versions appear to have dropped that.) > gcc provides such an option : gcc -include stdio.h hello_world.c If someone really wanted to, they could easily make a shell script, bash alias, Windows bat file, or whatever, as a wrapper for gcc with a whole bunch of "-include" options for all the standard headers.