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 bootstrap/53348] New: Conflicting fast-integer types on AIX: <sys/inttypes.h> vs. gcc/config/rs6000/aix-stdint.h


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

             Bug #: 53348
           Summary: Conflicting fast-integer types on AIX:
                    <sys/inttypes.h> vs. gcc/config/rs6000/aix-stdint.h
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: skunk@iskunk.org
              Host: powerpc-ibm-aix4.3.2.0
            Target: powerpc-ibm-aix4.3.2.0
             Build: powerpc-ibm-aix4.3.2.0


Bootstrapping 4.7.0 on AIX 4.3 fails with

[...]
Making all in include
gmake[5]: Entering directory
`/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include'
mkdir -p ./powerpc-ibm-aix4.3.2.0/bits/stdc++.h.gch
/tmp/gcc-build/./gcc/xgcc -shared-libgcc -B/tmp/gcc-build/./gcc -nostdinc++
-L/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/src
-L/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/src/.libs
-B/opt/tg/powerpc-ibm-aix4.3.2.0/bin/ -B/opt/tg/powerpc-ibm-aix4.3.2.0/lib/
-isystem /opt/tg/powerpc-ibm-aix4.3.2.0/include -isystem
/opt/tg/powerpc-ibm-aix4.3.2.0/sys-include    -x c++-header -nostdinc++ -g 
-I/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/powerpc-ibm-aix4.3.2.0
-I/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include
-I/home/src/gcc-4.7.0/libstdc++-v3/libsupc++ -O2 -g -std=gnu++0x
/home/src/gcc-4.7.0/libstdc++-v3/include/precompiled/stdc++.h \
-o powerpc-ibm-aix4.3.2.0/bits/stdc++.h.gch/O2ggnu++0x.gch
In file included from
/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/bits/atomic_base.h:37:0,
                 from
/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/atomic:41,
                 from
/home/src/gcc-4.7.0/libstdc++-v3/include/precompiled/stdc++.h:100:
/tmp/gcc-build/./gcc/include/stdint.h:72:29: error: conflicting declaration
'typedef short int int_fast16_t'
In file included from /tmp/gcc-build/./gcc/include-fixed/sys/types.h:64:0,
                 from /usr/include/sys/lc_core.h:36,
                 from /usr/include/sys/localedef.h:43,
                 from /tmp/gcc-build/./gcc/include-fixed/ctype.h:131,
                 from
/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/cctype:44,
                 from
/home/src/gcc-4.7.0/libstdc++-v3/include/precompiled/stdc++.h:36:
/usr/include/sys/inttypes.h:143:18: error: 'int_fast16_t' has a previous
declaration as 'typedef int32_t int_fast16_t'
In file included from
/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/bits/atomic_base.h:37:0,
                 from
/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/atomic:41,
                 from
/home/src/gcc-4.7.0/libstdc++-v3/include/precompiled/stdc++.h:100:
/tmp/gcc-build/./gcc/include/stdint.h:75:29: error: conflicting declaration
'typedef unsigned char uint_fast8_t'
In file included from /tmp/gcc-build/./gcc/include-fixed/sys/types.h:64:0,
                 from /usr/include/sys/lc_core.h:36,
                 from /usr/include/sys/localedef.h:43,
                 from /tmp/gcc-build/./gcc/include-fixed/ctype.h:131,
                 from
/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/cctype:44,
                 from
/home/src/gcc-4.7.0/libstdc++-v3/include/precompiled/stdc++.h:36:
/usr/include/sys/inttypes.h:145:18: error: 'uint_fast8_t' has a previous
declaration as 'typedef uint32_t uint_fast8_t'
In file included from
/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/bits/atomic_base.h:37:0,
                 from
/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/atomic:41,
                 from
/home/src/gcc-4.7.0/libstdc++-v3/include/precompiled/stdc++.h:100:
/tmp/gcc-build/./gcc/include/stdint.h:76:30: error: conflicting declaration
'typedef short unsigned int uint_fast16_t'
In file included from /tmp/gcc-build/./gcc/include-fixed/sys/types.h:64:0,
                 from /usr/include/sys/lc_core.h:36,
                 from /usr/include/sys/localedef.h:43,
                 from /tmp/gcc-build/./gcc/include-fixed/ctype.h:131,
                 from
/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/cctype:44,
                 from
/home/src/gcc-4.7.0/libstdc++-v3/include/precompiled/stdc++.h:36:
/usr/include/sys/inttypes.h:146:18: error: 'uint_fast16_t' has a previous
declaration as 'typedef uint32_t uint_fast16_t'
gmake[5]: *** [powerpc-ibm-aix4.3.2.0/bits/stdc++.h.gch/O2ggnu++0x.gch] Error 1
gmake[5]: Leaving directory
`/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include'
gmake[4]: *** [all-recursive] Error 1
gmake[4]: Leaving directory
`/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3'
gmake[3]: *** [all] Error 2
gmake[3]: Leaving directory
`/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3'
gmake[2]: *** [all-stage1-target-libstdc++-v3] Error 2
gmake[2]: Leaving directory `/tmp/gcc-build'
gmake[1]: *** [stage1-bubble] Error 2
gmake[1]: Leaving directory `/tmp/gcc-build'
gmake: *** [bootstrap-lean] Error 2


The system defines the three types in question as follows:

$ pcregrep '\b(uint_fast8_t|u?int_fast16_t)\b' /usr/include/sys/inttypes.h 
typedef int32_t         int_fast16_t;
typedef uint32_t        uint_fast8_t;
typedef uint32_t        uint_fast16_t;


These definitions conflict with GCC's idea of the AIX definitions:

$ pcregrep -i '\b(uint_fast8_t|u?int_fast16_t)'
/home/src/gcc-4.7.0/gcc/config/rs6000/aix-stdint.h
#define INT_FAST16_TYPE "short int"
#define UINT_FAST8_TYPE "unsigned char"
#define UINT_FAST16_TYPE "short unsigned int"


Adding the following blurb to the top of $(builddir)/gcc/include/stdint.h
allows the build to proceed:

    #undef __INT_FAST16_TYPE__
    #undef __UINT_FAST8_TYPE__ 
    #undef __UINT_FAST16_TYPE__         

    #define __INT_FAST16_TYPE__  int32_t           
    #define __UINT_FAST8_TYPE__  uint32_t        
    #define __UINT_FAST16_TYPE__ uint32_t


The real fix, however, is probably to adjust aix-stdint.h so that its
definitions agree with the system's.


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