Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: David Brown Newsgroups: comp.lang.c Subject: Re: question about nullptr Date: Sun, 7 Jul 2024 12:07:35 +0200 Organization: A noiseless patient Spider Lines: 20 Message-ID: References: <90c2181ae4c7aac8f17f076093923d5b357c43aa@i2pn2.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 07 Jul 2024 12:07:38 +0200 (CEST) Injection-Info: dont-email.me; posting-host="2ad6d707d085a1c1af45b33fddfb7b5b"; logging-data="322532"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+sBTZSsqzwf2JD76LsK6xYmAR1CfXFpTk=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 Cancel-Lock: sha1:rdDHJmUfRRsyjHoAsPkRm7OnEBc= Content-Language: en-GB In-Reply-To: Bytes: 1982 On 07/07/2024 10:00, Lawrence D'Oliveiro wrote: > On Sat, 6 Jul 2024 18:57:08 +0200, David Brown wrote: > >> ... and for C compilers to support a flag like gcc's "-Wzero-as-null >> -pointer-constant" warning ... > > The trouble with compiler flags is they can never be part of any language > spec. > That is both their advantage, and their disadvantage. Let the C standards define what the language requires when the source code is correct, and have everyone agree on that. Let compiler implementations go beyond that and give options that some might want, and others not want. /I/ will probably use nullptr in C23 coding, and I like tools to enforce my style (because I make mistakes) but I would certainly not want to force others to change their style based on /my/ preferences.