[Bug c/79358] gcc.dg/c99-stdint-1.c fails with excess error

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Feb 3 17:47:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79358

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
What glibc do you have?
E.g. glibc 2.24 has in stdint.h
# if __WORDSIZE == 64
#  define SIZE_MAX              (18446744073709551615UL)
# else
#  ifdef __WORDSIZE32_SIZE_ULONG
#   define SIZE_MAX             (4294967295UL)
#  else
#   define SIZE_MAX             (4294967295U)
#  endif
# endif
and it seems s390 defines the right macros:
./sysdeps/s390/s390-32/bits/wordsize.h:# define __WORDSIZE32_SIZE_ULONG       1
./sysdeps/s390/s390-64/bits/wordsize.h:# define __WORDSIZE32_SIZE_ULONG       1
so even SIZE_MAX should be unsigned long.
While e.g. RHEL7 glibc (2.17) has:
# if __WORDSIZE == 64                                                
#  define SIZE_MAX              (18446744073709551615UL)                        
# else                                                                 
#  define SIZE_MAX              (4294967295U)                                   
# endif                                                                
so it seems this test actually tests libc rather than gcc if stdint.h is
provided by libc and not gcc.


More information about the Gcc-bugs mailing list