------- Comment #16 from joseph at codesourcery dot com  2009-04-01 14:26 
-------
Subject: Re:  <stdint.h>-related issues (C99 issues)

On Wed, 1 Apr 2009, dominiq at lps dot ens dot fr wrote:

> On *-darwin* we have
> 
> FAIL: gcc.dg/c99-stdint-1.c (test for excess errors)
> FAIL: gcc.dg/c99-stdint-2.c (test for excess errors)
> FAIL: gcc.dg/c99-stdint-5.c (test for excess errors)
> FAIL: gcc.dg/c99-stdint-6.c (test for excess errors)

Errors are expected until someone adds the relevant type information for 
Darwin to GCC and fixes any bugs in its system stdint.h.

> Errors for 99-stdint-[12].c:
> 
> /opt/gcc/_gcc_clean/gcc/testsuite/gcc.dg/c99-stdint-1.c: In function
> 'test_ptr':
> /opt/gcc/_gcc_clean/gcc/testsuite/gcc.dg/c99-stdint-1.c:186: error:
> initialization from incompatible pointer type
> /opt/gcc/_gcc_clean/gcc/testsuite/gcc.dg/c99-stdint-1.c:186: error:
> initialization from incompatible pointer type
> /opt/gcc/_gcc_clean/gcc/testsuite/gcc.dg/c99-stdint-1.c:189: error:
> initialization from incompatible pointer type

This means there is something wrong with the definitions of intptr_t, 
uintptr_t and their limits in the system stdint.h.  It can be fixed in GCC 
with fixincludes, but should also be reported upstream.

> /opt/gcc/_gcc_clean/gcc/testsuite/gcc.dg/c99-stdint-1.c: In function
> 'test_misc_limits':
> /opt/gcc/_gcc_clean/gcc/testsuite/gcc.dg/c99-stdint-1.c:217: error:
> initialization from incompatible pointer type

Either the size_t limits are wrong or GCC disagrees with the system on 
what type size_t should be.

> /opt/gcc/_gcc_clean/gcc/testsuite/gcc.dg/c99-stdint-1.c: In function
> 'test_constants':
> /opt/gcc/_gcc_clean/gcc/testsuite/gcc.dg/c99-stdint-1.c:230: error: pointer
> targets in initialization differ in signedness
> /opt/gcc/_gcc_clean/gcc/testsuite/gcc.dg/c99-stdint-1.c:230: error: pointer
> targets in initialization differ in signedness
> /opt/gcc/_gcc_clean/gcc/testsuite/gcc.dg/c99-stdint-1.c:230: error: pointer
> targets in initialization differ in signedness
> /opt/gcc/_gcc_clean/gcc/testsuite/gcc.dg/c99-stdint-1.c:231: error: pointer
> targets in initialization differ in signedness
> /opt/gcc/_gcc_clean/gcc/testsuite/gcc.dg/c99-stdint-1.c:231: error: pointer
> targets in initialization differ in signedness
> /opt/gcc/_gcc_clean/gcc/testsuite/gcc.dg/c99-stdint-1.c:231: error: pointer
> targets in initialization differ in signedness

The Darwin header wrongly uses unsigned types for the results of UINT8_C 
and UINT16_C.  Report the bug upstream (with reference to C99 TC1), fix 
with fixincludes.

> and for c99-stdint-[56].c:

These will fail until GCC knows internally what the types are.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=448

Reply via email to