[patch include]: Fix warnings

Nick Clifton nickc@redhat.com
Fri Sep 25 15:09:00 GMT 2009


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



More information about the Binutils mailing list