tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Many new errors on RPi because of ssize_t incompatibl


From: Michael Matz
Subject: Re: [Tinycc-devel] Many new errors on RPi because of ssize_t incompatible redefinition
Date: Tue, 25 Jul 2017 23:01:24 +0200 (CEST)
User-agent: Alpine 2.20 (LSU 67 2015-01-07)

Hi,

On Tue, 25 Jul 2017, grischka wrote:

uso ewin wrote:
I guess ptrdiff_t should indeed be a long int, but ssize_t should be an int,
same for intptr_t and uintptr_t should be an unsigned int.

gcc 6.3.0 on win32 (32bits):

test.c:9:14: error: '_Generic' selector of type 'int' is not compatible with any association
    _Generic((ptrdiff_t)0, void*:0);
             ^

So at least this gcc thinks that ptrdiff_t is of type 'int'.

You can definitely find out with:

% echo __PTRDIFF_TYPE__ | gcc -E

That is the value that tcc must use as well (and then stddef.h is supposed to simply use that macro, but only to define ptrdiff_t, not any related types, which shouldn't come from stddef.h at all actually). And yes, GCCs use 'int' for -m32 normally and 'long int' for -m64.

So the state with commit 28b7c9 was actually correct and was unfixed with the later 52622c.


Ciao,
Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]