From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id B2DE03894C12 for ; Tue, 6 Dec 2022 23:57:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B2DE03894C12 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.96,223,1665475200"; d="scan'208";a="88769552" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 06 Dec 2022 15:57:19 -0800 IronPort-SDR: FyJVgNdTRK3Aro4tzyyY+qxpBFEnIGU3ko2TlKvVKSu29GUW/wWEKC9bp8DFnx2PeUjCeT91bB uEAdV+Z17xj4iWutZ5hZowQL9iDlM8BrFwNa+gwV1rhvJczxHhI/uaXp9/662X8TfzX1fLYRVM Jf9Sim7tKri5nklLxwTJz9Hg1O3KeFbHOnnwbQg57YoaqCQUACjotcIiresvCxpXM3BibgoXMV Nlie5P/2FTso0D7wg/zCB1S0NyeddLCuegbqJaNc6aaPDAazJRbQLCN+I8UWMKnLJz/DoFKj9g wEk= Date: Tue, 6 Dec 2022 23:57:14 +0000 From: Joseph Myers To: Alejandro Colomar CC: Mike Frysinger , Seija K. , Subject: Re: Add restrict annotations to all functions that require it In-Reply-To: <082a5968-3f12-dc36-f50c-497820b0a4b2@gmail.com> Message-ID: <7f169d-e67d-ab82-e77f-a6f78a301495@codesourcery.com> References: <553333c5-cccc-9e9c-81ec-c47436c00b16@gmail.com> <082a5968-3f12-dc36-f50c-497820b0a4b2@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-3109.7 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP 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: On Sat, 3 Dec 2022, Alejandro Colomar via Libc-alpha wrote: > For example, this would be nonsense (and I honestly don't know what the > compiler would understand from it): > > void broken(int *restrict a, int *b, int *c); > void broken(int *a, int *restrict b, int *c); Qualifiers on parameters in a function declarator that is not part of a definition of that function have no semantic effect; restrict on function parameters only has a semantic effect in the definition of the function. -- Joseph S. Myers joseph@codesourcery.com