From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) by sourceware.org (Postfix) with ESMTPS id 21D173858414 for ; Thu, 11 May 2023 04:46:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 21D173858414 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-io1-xd2c.google.com with SMTP id ca18e2360f4ac-76c657dab03so58985939f.3 for ; Wed, 10 May 2023 21:46:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683780389; x=1686372389; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=KgzPXDLaHkgH1QPVV94OEclDw9nmeAvGYq0wQOWr9cw=; b=T7apXBOW4ms/jY1B3IFWjHwDKHnfLUm9q9zma0Qg5t6Kj3JLXqxASc408uJcDHP7wk u25nDipp+PGBYPVpyE0sM8h8F8jAhO8SzJNmCavC2khN222wYedjLZm7kSs0zveCEdgV MrGcqJAdDbNOE9V13fc6G4BgIHUw/kGHFxvXA/U/LGXTzq9ztjMNo7G1poyQJfklcAbg TP8tbqqlzz+eHvAooDhWnWLtrb90elsVJWGAauXQo6nxko/H5LFEqeNkLLzsDAGv3fct 5Evd0X/XH3FonTDa9749lXoWhr42/N29HLS2wP9ZQmndoJIP2kCEf6WHcX9ETypR0b/M W3Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683780389; x=1686372389; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KgzPXDLaHkgH1QPVV94OEclDw9nmeAvGYq0wQOWr9cw=; b=YYM9ncXUPJEWmcHuPSxSLMivjErVVtBJiiXK+RcrIY1CF0m52RZfbgw8aVVMTeKWMw mfV28Hy9+8p0iPbgBbPgxz4YAy8zUyIoqGEe3AEkJmyZM2JDPJToXsrq+hjGGkb9qjoZ MLqx5lf342ch+uwA8QCP3eL2uR7Xl335rMsSaZCek5hK7BIsy3CZ/hM22FPfbSx9LVuU R9aw1IjwYtM/HLVk9B0d8Oz7va0XWkfg5TWIz143+BT9Q1zwsc7uQ/8XvxWF5rvQb/jn Fc4E2Ujjhoq2TWGRrOa3Hi/apNYdE2B35X5VbI7KZqhW/J8wZtUwLNPukGaokj2TZKHF FG9g== X-Gm-Message-State: AC+VfDzyXb9di8kPsYJ7wCpp7Jcep88Fp0aq7LqDVVN+M4k//su+tjRg U0Q+txUo6g+NAMqr+Vz/AfSMxyEuSyKm7w== X-Google-Smtp-Source: ACHHUZ6WZAoh36hTbdVk/Am1zD22WgbgD9wnnIucNITvIgvF/SRFPfO60SsUxExfqQgfDe9zqkKBhw== X-Received: by 2002:a6b:e70f:0:b0:76c:8378:2424 with SMTP id b15-20020a6be70f000000b0076c83782424mr89694ioh.6.1683780389067; Wed, 10 May 2023 21:46:29 -0700 (PDT) Received: from ?IPV6:2600:1700:57f0:ca20:763a:c795:fcf6:91ea? ([2600:1700:57f0:ca20:763a:c795:fcf6:91ea]) by smtp.gmail.com with ESMTPSA id q20-20020a6bd214000000b00763ae96e71bsm4037435iob.41.2023.05.10.21.46.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 10 May 2023 21:46:28 -0700 (PDT) Message-ID: <67e65b41-5400-d1c2-9f43-f94d0ea7da9b@gmail.com> Date: Thu, 11 May 2023 00:46:23 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: More C type errors by default for GCC 14 Content-Language: en-US-large To: Po Lu Cc: gcc@gcc.gnu.org References: <87mt2behdl.fsf@yahoo.com> <57238276-5966-98d6-d5f0-f5451013ed17@gmail.com> <871qjned25.fsf@yahoo.com> From: Eli Schwartz X-Clacks-Overhead: GNU Terry Pratchett In-Reply-To: <871qjned25.fsf@yahoo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KAM_NUMSUBJECT,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 5/10/23 11:56 PM, Po Lu wrote: > Eli Schwartz writes: > >>> Unfortunately, we do not have the source code for our compiler. Would >>> you care to ask people here to restore `gcc -traditional'? >> >> >> This would appear to be a self-inflicted wound. If I understand the >> chain of events properly... > > The chain of events actually is: > > - The code was originally written for the BSD Unix cc. > - Eventually, it started to be built with GCC, with -traditional. > - GCC removes -traditional. > - We are forced to find another C comppiler. Right, this is what I said. Although your bullet points 1 and 2 don't really have much of anything to do with it. In between points 3 and 4, I noted that you wish to *use* such bad code. I didn't say you wish to write it, merely that you wish to use it (without judging when it was written). > Note that I wasn't where I am when this started, so everything above is > second hand knowledge. > > And finally, this: > >> - to avoid making it produce invalid results, you hack your linker > > Which is essentially link-time lint, and not related to the subject at > hand. I only mentioned it to make a point, which is that people writing > traditional C in this day and age are unlikely to make any mistakes > doing so. Absolutely! It's a very good point. It's a point that people writing traditional not-C in this day and age are doing so with highly complex toolchains they have personally written to do things that no non-bespoke toolchain does. As such, they are unaffected by any and all decisions GCC makes. But if they were affected by such decisions, they would have the technical knowledge to modify GCC to suit themselves. >> You'd rather hack your compiler, but you cannot do it because you >> purchased a proprietary compiler and didn't purchase the rights to its >> source code. >> >> (BTW, there's a FOSS compiler that you can hack on if you like.) > > Which sadly does not support the code which we need to compile. > Clearly, turning GCC into a K&R compiler is not a very welcome idea > around here, so why would we hack on it? But your bespoke toolchain did not support the code which you need to compile either. That's why you began hacking on it at all, to suit your needs. So if neither GCC nor your bespoke toolchain support the code you need to compile, and you must modify *something* to suit yourself, then it is definitely possible to do it for GCC instead. I don't see what the welcome for making these modifications into the default flagship experience for the entire free software ecosystem, has to do with your being welcome to hack on GCC for your own personal use. Do you feel welcome by your proprietary vendor, who refuses to let you touch it at all by withholding source code? >> That's all fine and well, you do you. What I do not understand is, two >> things. >> >> First of all, why are you calling this "traditional C"? It is not >> "traditional C". It isn't C. It is not-C. > > When the file names for the source files end with `.c' and `.h', and the > compiler is named `cc' and `acomp', it is C. It just isn't Standard C. BRB, renaming all my python files to *.c and symlinking /usr/bin/cc to /usr/bin/python. ... No, the criteria for whether something constitutes a given programming language are not "the file extension says so" or "the compiler name says so". A programming language is defined by the syntax and meaning of that programming language. (If we were to replace this conversation with a definition of what constitutes python, then as a scripted language, all files without file extensions could be python scripts. And similarly, people play interesting games with C files by naming them unconventional names and passing -xc to the compiler. File extension autodetection isn't everything.) >> Second of all, why is this GCC's problem? You are not a user of GCC, >> apparently. > > Because decisions arbitrarily made on GCC's part will simply result in > even more people deciding to find some other compiler. > > The point being that people sufficiently dedicated to their existing > code to not have changed in over 30 years will not respond to such > changes by changing their code. They are much more likely to look for > some other compiler instead. Well no, because if they are sufficiently dedicated to their existing code to not have changed in over 30 years then they are writing c89 code and passing -std=c89, and this is acceptable as far as GCC is concerned and their code will still compile. So they won't feel inclined to find some other compiler, and quite frankly, if they were doing the right thing in accordance with the standard way to use the language they prefer to use, then they probably will not notice that GCC changed anything? >> And implicit-function-declaration does not have the same problem as >> -traditional, because implicit-function-declaration ***WILL*** have a >> flag that permits people who are users of GCC, and just want >> implicit-function-declaration back. > > And remember that `-traditional' DID exist for a certain amount of time. > Then it was removed. So in addition to annoying a lot of people, what > guarantees that -Wno-implicit will not be removed in the future, after > the proposed changes are made? What guarantees of the future do you have for anything? What guarantees do you have that a meteor won't hit Earth and wipe out all human life in a great catastrophe? What guarantees do you have that GCC will still be run by the current maintainers? What guarantees do you have that GCC will still be maintained at all? What guarantees do you have that GCC won't decide next year that they are deleting all support for std > c89, making -traditional the default, and becoming a historical recreation society? What guarantees do you have that GCC won't decide next year that they are deleting all support for std < c23, mandating that everyone upgrade to the very latest std that isn't even fully implemented today? What guarantees do you have that reality exists as you think of it? Maybe you are a pink elephant and computers are a figment of your imagination. ... I think that what-ifs aren't the most productive use of our time. The current proposal provides for -std=c89 and similar, so the current proposal does not cause current GCC users to be unable to use GCC after the proposed change. If a future proposal causes current GCC users to be unable to use GCC after the future proposal is implemented, then, and only then, should we worry about whether it will be possible to use GCC. Then, and only then, will a threat to prevent doing so have actually materialized. -- Eli Schwartz