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.129.124]) by sourceware.org (Postfix) with ESMTPS id 14BC3385AC35 for ; Tue, 5 Dec 2023 10:59:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 14BC3385AC35 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 14BC3385AC35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701773988; cv=none; b=wfogriPYNLHWiGT5WGn+QE+TAFRZ8f53cI1luS9bZqWI5IoDpCcFOy8s+MPPH0w2oCuB0hWnC6KxZHUGNeAnOSv3JwHDuOWqCr64zkd6p5VlqY34o5E5ZbbPKQfrxN2I+DFuv7v92Y0zOm4K6OrIfwxwztOw101qCvxY56tMCvQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701773988; c=relaxed/simple; bh=jl0afjCMvg60sC6oS+2YiCp6IneEMvz6+/HXqMzUstw=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=Eou7jWpoijC3XMtEwVVztfPQuxGyykFVWUQGV2YJW0TYi7VmN6TNVjY3/1g82O61OXnv1cDEPNRc0VdXk0HAR7TGPWvzc06kFta6Zb5ipKFaDpslVx0uKxFO3zBuVMNcCIffgpoySAZ5ZBumJc0Z4ygHMXvpNzk60LL3fj9lr/w= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701773986; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=8WTbWMTOERAfy2WeS0i6X0kqCpKmqxkfbDyoP/5P6BI=; b=U33hAzA/ye/0l5cgpBTaRSHRHeZuRmaJ+Bj6J0rlJrcjPH7jq6bbbWZm3HK7QBJaiXe3k4 TQ4A0XHTs5WsdFIpzWqT80BvVnuSbp9jYlsdSrYGocCwpTNXC8xuP7/cmlghPZridlYcuP Wbk3BwC6dc4sITRO/HcPYtbilCSeixI= 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-407-igKyw3QwPsq4nxzWm6iE5A-1; Tue, 05 Dec 2023 05:59:43 -0500 X-MC-Unique: igKyw3QwPsq4nxzWm6iE5A-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (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 04B57830FD8; Tue, 5 Dec 2023 10:59:43 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.195.157]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B4BE92166B31; Tue, 5 Dec 2023 10:59:42 +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 3B5AxeXU723811 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 5 Dec 2023 11:59:40 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 3B5Axc3B723810; Tue, 5 Dec 2023 11:59:38 +0100 Date: Tue, 5 Dec 2023 11:59:38 +0100 From: Jakub Jelinek To: Richard Earnshaw Cc: Tobias Burnus , Florian Weimer , gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org Subject: Re: [PATCH] libgfortran: Fix -Wincompatible-pointer-types errors Message-ID: Reply-To: Jakub Jelinek References: <9e40a64880a14cf27d788ecbaf23365b9a5ac069.1700473918.git.fweimer@redhat.com> <87zfypvv6t.fsf@oldenburg.str.redhat.com> <8ba09ce2-9b19-4fd2-9d3a-01c4add02c91@foss.arm.com> <55c954b8-65c3-4df2-ac76-1ab77f42006f@foss.arm.com> MIME-Version: 1.0 In-Reply-To: <55c954b8-65c3-4df2-ac76-1ab77f42006f@foss.arm.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3.4 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_H4,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 Tue, Dec 05, 2023 at 10:57:50AM +0000, Richard Earnshaw wrote: > On 05/12/2023 10:51, Jakub Jelinek wrote: > > On Tue, Dec 05, 2023 at 10:47:34AM +0000, Richard Earnshaw wrote: > > > > The following patch makes libgfortran build on i686-linux after hacking up > > > > --- kinds.h.xx 2023-12-05 00:23:00.133365064 +0100 > > > > +++ kinds.h 2023-12-05 11:19:24.409679808 +0100 > > > > @@ -10,8 +10,8 @@ typedef GFC_INTEGER_2 GFC_LOGICAL_2; > > > > #define HAVE_GFC_LOGICAL_2 > > > > #define HAVE_GFC_INTEGER_2 > > > > -typedef int32_t GFC_INTEGER_4; > > > > -typedef uint32_t GFC_UINTEGER_4; > > > > +typedef long GFC_INTEGER_4; > > > > +typedef unsigned long GFC_UINTEGER_4; > > > > > > That doesn't look right for a 64-bit processor. Presumably 4 means 4 bytes, > > > > i686-linux is an ILP32 target, which I chose exactly because I regularly build > > it, had a tree with it around and because unlike 64-bit targets there are 2 > > standard 32-bit signed integer types. Though, normally int32_t there is > > int rather than long int and so the errors only appeared after this hack. > > > > My point is that on aarch64/x86_64 etc, this will make GFC_INTEGER_4 a > 64-bit type, whereas previously it was 32-bit. Sure. The above patch is a hack for a generated header. I'm not proposing that as a change, just explaining how I've verified the actual patch on i686-linux with such a hack. Jakub