public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/53348] New: Conflicting fast-integer types on AIX: <sys/inttypes.h> vs. gcc/config/rs6000/aix-stdint.h
@ 2012-05-14 18:08 skunk at iskunk dot org
  2012-05-14 22:53 ` [Bug bootstrap/53348] " skunk at iskunk dot org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: skunk at iskunk dot org @ 2012-05-14 18:08 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-02-17 16:33 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-14 18:08 [Bug bootstrap/53348] New: Conflicting fast-integer types on AIX: <sys/inttypes.h> vs. gcc/config/rs6000/aix-stdint.h skunk at iskunk dot org
2012-05-14 22:53 ` [Bug bootstrap/53348] " skunk at iskunk dot org
2012-05-14 23:25 ` skunk at iskunk dot org
2012-05-15 13:49 ` dje at gcc dot gnu.org
2012-05-15 17:41 ` skunk at iskunk dot org
2012-05-15 18:07 ` dje at gcc dot gnu.org
2012-05-15 19:09 ` skunk at iskunk dot org
2012-07-17 23:24 ` skunk at iskunk dot org
2015-02-07  1:13 ` dje at gcc dot gnu.org
2015-02-07  2:55 ` dje at gcc dot gnu.org
2015-02-16 15:29 ` dje at gcc dot gnu.org
2015-02-16 15:33 ` dje at gcc dot gnu.org
2015-02-17  6:40 ` skunk at iskunk dot org
2015-02-17 14:50 ` dje at gcc dot gnu.org
2015-02-17 16:33 ` skunk at iskunk dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).