This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: int8_t problem
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Okko Willeboordse <trash at willeboordse dot demon dot nl>
- Cc: libc-alpha at sourceware dot org
- Date: Thu, 16 Nov 2006 22:36:38 +0100
- Subject: Re: int8_t problem
- References: <455CC5AA.4090105@willeboordse.demon.nl>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Nov 16, 2006 at 09:10:18PM +0100, Okko Willeboordse wrote:
> Using
> gcc version 4.0.2 20051125 (Red Hat 4.0.2-8)
> glibc-devel Version: 2.3.5-5mdk Architecture: i586 Size: 9997 KB
>
> I found that int8_t is defined in both;
>
> stdint.h and sys/types.h
>
> in different ways.
>
> Depending on what I include I get different definitions.
>
> Added to that, in sys/types.h __attribute__ is used in
> the definition.
>
> My Lint (Gimpel) doesn't know about __attribute__ so it ignores it.
> This results in different definitions of int8_t.
> When stdint.h is included int8_t is signed char and when
> sys/types.h is included int8_t is int and my lint starts
> issuing false positives.
>
> What should I do?
Don't use lint which doesn't understand GCC __attribute__ extensions?
Jakub