From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from hamza.pair.com (hamza.pair.com [209.68.5.143]) by sourceware.org (Postfix) with ESMTPS id 6A278386EC11 for ; Thu, 15 Feb 2024 22:58:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6A278386EC11 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=pfeifer.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=pfeifer.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6A278386EC11 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.68.5.143 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708037938; cv=none; b=QyWeFswCcWvcbCqEeGDQ1QFnwklZ1X+oIyBEv+oI18ZVKya9MN+HhdVpzRx7UNyF4LyyDrfuiV0Sn8V6mddBsYCKKD6BqmiH0ZI9YD/7P9SwROnYVuZ4tXtOBf0pmH2RGV3Sj40Z/MlXEgLrWIR0JQg9kQjHWx1ZQoYJF1SMtZY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708037938; c=relaxed/simple; bh=/C9C84SVzZMzaRok2sdHgfL9UHf1luA7TGJgpHwWiHQ=; h=Date:From:To:Subject:Message-ID:MIME-Version; b=Vw3U6bJZEyNNJLpOxx8hfb9BCE9tgDRmEskV/Pq6UAGeKaCgdt23lnRoasgeqNnK0UBARhCALG4kIq819UR+rqo86eAhbzN6o2DDMDz4gb4dgBymomuF+F8YnPbMtnNdYiJuCrwWiB8Gdyysyp61+3U488AWeSpkYazODnDfGd0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from hamza.pair.com (localhost [127.0.0.1]) by hamza.pair.com (Postfix) with ESMTP id E784B33ECA; Thu, 15 Feb 2024 17:58:55 -0500 (EST) Received: from daya.localdomain (188-23-3-19.adsl.highway.telekom.at [188.23.3.19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by hamza.pair.com (Postfix) with ESMTPSA id 6861C33ED8; Thu, 15 Feb 2024 17:58:55 -0500 (EST) Date: Thu, 15 Feb 2024 23:58:43 +0100 (CET) From: Gerald Pfeifer To: Florian Weimer cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Notes on the warnings-as-errors change in GCC 14 In-Reply-To: <87edddaeac.fsf@oldenburg.str.redhat.com> Message-ID: <6702871e-689f-67ac-a761-b013c6aa9f0b@pfeifer.com> References: <87v876ssxg.fsf@oldenburg.str.redhat.com> <9fce9298-1aec-27ce-591e-a1d415d34dba@pfeifer.com> <87edddaeac.fsf@oldenburg.str.redhat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323328-1640899687-1708037935=:5863" X-Scanned-By: mailmunge 3.11 on 209.68.5.143 X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,KAM_NUMSUBJECT,RCVD_IN_BARRACUDACENTRAL,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-1640899687-1708037935=:5863 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT On Thu, 15 Feb 2024, Florian Weimer wrote: >> Naive questions: Can definitions really be prototypes (in C)? > Yes, I think so: definitions can be declarations, and function > prototypes are declarations. The standard uses the phrase “function > definition that does not include a function prototype declarator”. > Should I write “old-style function definition” instead? I think that would have helped me (as a not too much of a language expert). Only make that change if you think it makes sense, though. >>> +GCC will type-check function arguments after that, potentially >>> +requiring further changes. (Previously, the function declaration was >>> +treated as not having no prototype.) >> That second sentence uses double negation, which logically is the same as >> just the original statement. > Other reviews suggests to change it to “not having [a] prototype”. Ah, let's use that then. >>> +By default, GCC still accepts returning an expression of >>> +type void from within a function that itself >>> +returns void, as a GNU extension that matches C++ rules >>> +in this area. > Does the GNU extension match C++ (standard rules)? > Yes. Should I write “matches [standard] C++ rules”? Looks good to me. (At first I was confused, but I guess this is a GNU extension to the C standard - that matches standard C++ in this area?) Gerald --8323328-1640899687-1708037935=:5863--