This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: CVS-19981209: Patch for "unsigned HOST_WIDE_INT" on Solaris2.6


It is only an irix5 problem, it is not an irix6 problem.  Under irix5, there
is an inttypes.h file, but it isn't useful, because it clashes with
<sys/types.h>.  This should not prevent use of inttypes.h on any machine
with a useful inttypes.h file.

henway<6>cat tmp.c
#include <sys/types.h>
#include <inttypes.h>
henway<7>cc tmp.c
cfe: Error: /usr/include/inttypes.h, line 61: redeclaration of 'int8_t'; previous declaration at line 211 in file '/usr/include/sys/types.h'
 typedef        signed char             int8_t;
 -------        -----------             ^
...

To make matters more confusing, gcc gives a warning instead of an error for
this case, because the two type definitions are identical.  Thus whether
inttypes.h is usable depends on which compiler you use.  If you configure
using gcc, and then try to build using cc, the build could fail with the above
error.  You aren't supposed to use a different compiler for configuring and
building anyways, but we unconditionally disable use of inttypes.h for an
irix5 host just to be sure.

Jim


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]