public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Earnshaw <Richard.Earnshaw@foss.arm.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Tobias Burnus <tobias@codesourcery.com>,
	Florian Weimer <fweimer@redhat.com>,
	gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org
Subject: Re: [PATCH] libgfortran: Fix -Wincompatible-pointer-types errors
Date: Tue, 5 Dec 2023 10:57:50 +0000	[thread overview]
Message-ID: <55c954b8-65c3-4df2-ac76-1ab77f42006f@foss.arm.com> (raw)
In-Reply-To: <ZW8AnXZhS9Jr1FKS@tucnak>



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.

R.

> 	Jakub
> 

  reply	other threads:[~2023-12-05 10:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1700473918.git.fweimer@redhat.com>
     [not found] ` <9e40a64880a14cf27d788ecbaf23365b9a5ac069.1700473918.git.fweimer@redhat.com>
     [not found]   ` <c1c981c8-d6a1-4c45-a5e4-3a392035061e@foss.arm.com>
     [not found]     ` <87zfypvv6t.fsf@oldenburg.str.redhat.com>
2023-12-05 10:33       ` Jakub Jelinek
2023-12-05 10:47         ` Richard Earnshaw
2023-12-05 10:51           ` Jakub Jelinek
2023-12-05 10:57             ` Richard Earnshaw [this message]
2023-12-05 10:59               ` Jakub Jelinek
2023-12-05 17:35                 ` Richard Earnshaw
2023-12-05 11:00               ` Florian Weimer
2023-12-05 13:35         ` Tobias Burnus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55c954b8-65c3-4df2-ac76-1ab77f42006f@foss.arm.com \
    --to=richard.earnshaw@foss.arm.com \
    --cc=fortran@gcc.gnu.org \
    --cc=fweimer@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=tobias@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).