This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

[Bug target/25259] bootstrap failures on non-C99 platforms



------- Comment #8 from ebotcazou at gcc dot gnu dot org  2005-12-18 07:17 -------
> This one includes the change to the usage of __extension__ that Andrew pointed
> out.

In file included from /home/eric/svn/gcc/libdecnumber/decContext.h:43,
                 from /home/eric/svn/gcc/libdecnumber/decNumber.h:30,
                 from /home/eric/svn/gcc/libdecnumber/decNumber.c:157:
./gstdint.h:93: error: parse error before "uintptr_t"
./gstdint.h:93: warning: type defaults to `int' in declaration of `uintptr_t'
./gstdint.h:93: error: ISO C forbids data definition with no type or storage
cla
ss
./gstdint.h:94: error: parse error before "intptr_t"
./gstdint.h:94: warning: type defaults to `int' in declaration of `intptr_t'
./gstdint.h:94: error: ISO C forbids data definition with no type or storage
cla
ss
./gstdint.h:97: error: parse error before "int_least8_t"
./gstdint.h:97: warning: type defaults to `int' in declaration of
`int_least8_t'
./gstdint.h:97: error: ISO C forbids data definition with no type or storage
cla
ss
./gstdint.h:98: error: parse error before "int_least16_t"
./gstdint.h:98: warning: type defaults to `int' in declaration of
`int_least16_t
'
./gstdint.h:98: error: ISO C forbids data definition with no type or storage
cla
ss
./gstdint.h:99: error: parse error before "int_least32_t"
./gstdint.h:99: warning: type defaults to `int' in declaration of
`int_least32_t
'

line 92:
/* Define intptr_t based on sizeof(void*) = 4 */
typedef uint32_t uintptr_t;
typedef int32_t  intptr_t;

/* Define int_least types */
typedef int8_t     int_least8_t;
typedef int16_t    int_least16_t;
typedef int32_t    int_least32_t;


Excerpt of the output with -E:

# 292
"/opt/TWWfsw/gcc343/lib/gcc/sparc-sun-solaris2.5.1/3.4.3/include/sys/type\
s.h" 2 3 4
# 7 "./gstdint.h" 2
# 1 "/opt/TWWfsw/gcc343/lib/gcc/sparc-sun-solaris2.5.1/3.4.3/include/stddef.h"
\
1 3 4
# 151
"/opt/TWWfsw/gcc343/lib/gcc/sparc-sun-solaris2.5.1/3.4.3/include/stddef.h\
" 3 4
typedef int ptrdiff_t;
# 8 "./gstdint.h" 2
# 21 "./gstdint.h"
typedef unsigned char uint8_t;




typedef unsigned uint16_t;
# 70 "./gstdint.h"
__extension__ typedef long long int64_t;



__extension__ typedef unsigned long long uint64_t;
# 93 "./gstdint.h"
typedef uint32_t uintptr_t;
typedef int32_t intptr_t;


typedef int8_t int_least8_t;
typedef int16_t int_least16_t;
typedef int32_t int_least32_t;


The problem stems from:

#ifndef GCC_GENERATED_STDINT_H
#define GCC_GENERATED_STDINT_H 1

#include <sys/types.h>
#include <stddef.h>
/* glibc uses these symbols as guards to prevent redefinitions.  */
#ifndef __int8_t_defined
#define _INT8_T
#define _INT16_T
#define _INT32_T
#endif
#ifndef __uint32_t_defined
#define _UINT32_T
#endif

Nice self-cancellation. :-)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25259


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