This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch include]: Fix warnings
- From: Nick Clifton <nickc at redhat dot com>
- To: Kai Tietz <ktietz70 at googlemail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Binutils <binutils at sourceware dot org>
- Date: Fri, 25 Sep 2009 16:09:07 +0100
- Subject: Re: [patch include]: Fix warnings
- References: <90baa01f0909241142q33c90277yafec88d785244d65@mail.gmail.com>
Hi Kai,
this patch fixes warnings about the use of long long, when cX9
standards are used, by prefixing typedef by __extension__.
> - typedef unsigned long long libi_uhostptr_t;
> - typedef long long libi_shostptr_t;
> + __extension__ typedef unsigned long long libi_uhostptr_t;
> + __extension__ typedef long long libi_shostptr_t;
This would work providing that you are always compiling with a recent
version of gcc or that you have included ansidecl.h before splay-tree.h,
but that cannot be guaranteed. I would suggest adding a check for gcc
as well, eg:
#ifdef __GNUC__
__extension__
#endif
typedef unsigned long long lib_uhostptr_t;
Cheers
Nick