From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 659FE3858C62 for ; Thu, 1 Feb 2024 08:22:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 659FE3858C62 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 659FE3858C62 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706775750; cv=none; b=K1uHgnCiI71zC7QBY4BvPZ1L1Wq8A/aLahoO0k9/ckF38eylCaJsPn3Tuu0V1Ut6MfeIfhkrTPtcboYfp4qqTO4Cal2LwCeXtMZXe/MylzM1MG/BJidyn8qf0C/XywljFcFA63a/jZnqUbQqQmtKiXjdY/did1Bs06umPzQrfzk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706775750; c=relaxed/simple; bh=l/BxTGJ9hCuoJxIGkIh0igxkenkEM26fv8w4jFSAhyE=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=hPB/5TTgi/j4yM2nRPkPOapx3qBTq/5MjeGUO6LyxMNkIWgn9Owm1h+CT53YcGcTQeenDBD/EncmIyUFfyRrBEdRcPjlBv4wD22NCljDUHD3oDP08hOtXsL91J63QgSBFv96l0Yn3Et27a09CplUfOkGEW0lXU2AC/j0YGJue80= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706775748; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YZlKh206LzaLEXGqmFanpLpc81Ak8dlLRJt1skFc2aM=; b=Jmi0dWcVpt8QaexZKorr2JFHZuHPWlkCrXZDAQzZDTGlwXXdRC5XpqKE6USnPliloIM3k8 Z1u1SFeXv8YpZiOgj91UXbREiEbeTwNybfHlVrOlDrvQ9FbFYjO3E2/smiWrqwGv0yNNN9 FjK0R5D7/+kDcERf7uH0wHE5q0Hvc0o= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-14--gVb1eMEMQ2XNbZ4-o18Dg-1; Thu, 01 Feb 2024 03:22:26 -0500 X-MC-Unique: -gVb1eMEMQ2XNbZ4-o18Dg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 68834185A780; Thu, 1 Feb 2024 08:22:26 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.70]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2CA28400D5CE; Thu, 1 Feb 2024 08:22:26 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 4118M3Kr3129859 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 1 Feb 2024 09:22:03 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 4118M2mB3129858; Thu, 1 Feb 2024 09:22:02 +0100 Date: Thu, 1 Feb 2024 09:22:02 +0100 From: Jakub Jelinek To: Iain Sandoe , GCC Patches Subject: Re: [PATCH] libgcc: Avoid warnings on __gcc_nested_func_ptr_created [PR113402] Message-ID: Reply-To: Jakub Jelinek References: <20240118145923.25112-1-iain@sandoe.co.uk> <147CA2E9-770F-48EA-9408-18C7090D05A6@sandoe.co.uk> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,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 Wed, Jan 31, 2024 at 01:04:20PM +0100, Jakub Jelinek wrote: > On Sun, Jan 28, 2024 at 11:02:33AM +0000, Iain Sandoe wrote: > > * config/aarch64/heap-trampoline.c: Rename > > __builtin_nested_func_ptr_created to __gcc_nested_func_ptr_created and > > __builtin_nested_func_ptr_deleted to __gcc_nested_func_ptr_deleted. > > * config/i386/heap-trampoline.c: Likewise. > > * libgcc2.h: Likewise. > > I'm seeing hundreds of > In file included from ../../../libgcc/libgcc2.c:56: > ../../../libgcc/libgcc2.h:32:13: warning: conflicting types for built-in function ‘__gcc_nested_func_ptr_created’; expected ‘void(void *, void *, void *)’ [-Wbuiltin-declaration-mismatch] > 32 | extern void __gcc_nested_func_ptr_created (void *, void *, void **); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > warnings. > > Either we need to add like in r14-6218 > #pragma GCC diagnostic ignored "-Wbuiltin-declaration-mismatch" > (but in that case because of the libgcc2.h prototype (why is it there?) > it would need to be also with #pragma GCC diagnostic push/pop around), > or we could go with just following how the builtins are prototyped on the > compiler side and only cast to void ** when dereferencing (which is in > a single spot in each TU). Bootstrapped/regtested on x86_64-linux and i686-linux successfully. > 2024-01-31 Jakub Jelinek > > * libgcc2.h (__gcc_nested_func_ptr_created): Change type of last > argument from void ** to void *. > * config/i386/heap-trampoline.c (__gcc_nested_func_ptr_created): > Change type of dst from void ** to void * and cast dst to void ** > before dereferencing it. > * config/aarch64/heap-trampoline.c (__gcc_nested_func_ptr_created): > Likewise. Jakub