-----Original Message----- From: Marc Glisse [mailto:marc.glisse@xxxxxxxx] Sent: Monday, June 16, 2014 10:30 AM To: Arthur Schwarz Cc: gcc-help@xxxxxxxxxxx Subject: Re: -m32 option failure On Mon, 16 Jun 2014, Arthur Schwarz wrote: > Win7 > Gcc 4.8.3 (cygwin) > > g++ -m32 -Wall -Wno-reorder -Wno-unused-value -DYYDEBUG=1 -DDEBUG_IO -c -g > -MMD -MP -MF > > Generate a 64-bit program works. When the -m32 option is used the following > diagnostic message is output. > > In file included from lex.Slip.cpp:754:0: > /usr/lib/gcc/x86_64-pc-cygwin/4.8.3/include/c++/cstdlib:178:10: error: > expected unqualified-id before '__int128' > inline __int128 > > My intent is to generate a 32-bit compliant executable program for an > i686/x86 compatible computer. Have I misunderstood the option? What is the > correct way to do this? Assuming you did nothing special to your cygwin installation, this looks like a bug. Could you compile with -v to check which include directories are looked at, compile with -E and find in the output which file c++config.h is included, and finally look in that file what it says about the macro _GLIBCXX_USE_INT128? -- Marc Glisse ================================================ Netbeans 7.4 Option -E yields no useful information. C:\cygwin64\bin\make.exe -f nbproject/Makefile-Release.mk build/Release/Cygwin64-Windows/lex.slip.o mkdir -p build/Release/Cygwin64-Windows rm -f "build/Release/Cygwin64-Windows/lex.slip.o.d" x86_64-pc-cygwin-g++ -m32 -c -O2 -E -MMD -MP -MF "build/Release/Cygwin64-Windows/lex.slip.o.d" -o build/Release/Cygwin64-Windows/lex.slip.o lex.slip.cpp In looking at /usr I find i686-pc-cygwin, which appears to be the only library (et al) included. However, the make file shows x86_64-pc-cygwin-g++ as the compiler being used. The config file c++config.h is not in i686-pc-cygwin. I'll check gcc 4.8.3-2 on my desktop, tonight. art I don't know if this helps, but the -v output is: CLEAN SUCCESSFUL (total time: 50ms) C:\cygwin64\bin\make.exe -f nbproject/Makefile-Release.mk build/Release/Cygwin64-Windows/lex.slip.o mkdir -p build/Release/Cygwin64-Windows Using built-in specs. rm -f "build/Release/Cygwin64-Windows/lex.slip.o.d" x86_64-pc-cygwin-g++ -m32 -c -O2 -v -MMD -MP -MF "build/Release/Cygwin64-Windows/lex.slip.o.d" -o build/Release/Cygwin64-Windows/lex.slip.o lex.slip.cpp COLLECT_GCC=x86_64-pc-cygwin-g++ Target: x86_64-pc-cygwin Configured with: /cygdrive/i/szsz/tmpp/cygwin64/gcc/gcc-4.8.2-3/src/gcc-4.8.2/configure --srcdir=/cygdrive/i/szsz/tmpp/cygwin64/gcc/gcc-4.8.2-3/src/gcc-4.8.2 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/libexec --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc --libdir=/usr/lib --datarootdir=/usr/share --docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C --build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --disable-__cxa_atexit --with-dwarf2 --with-tune=generic --enable-languages=ada,c,c++,fortran,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libatomic --enable-libgomp --disable-libitm --enable-libquadmath --enable-libquadmath-support --enable-libssp --enable-libada --enable-libgcj-sublibs --disable-java-awt --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix --without-libintl-prefix --with-system-zlib --libexecdir=/usr/lib Thread model: posix gcc version 4.8.2 (GCC) COLLECT_GCC_OPTIONS='-m32' '-c' '-O2' '-v' '-MMD' '-MP' '-MF' 'build/Release/Cygwin64-Windows/lex.slip.o.d' '-o' 'build/Release/Cygwin64-Windows/lex.slip.o' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /usr/lib/gcc/x86_64-pc-cygwin/4.8.2/cc1plus.exe -quiet -v -imultilib "" -MMD build/Release/Cygwin64-Windows/lex.slip.d -MF build/Release/Cygwin64-Windows/lex.slip.o.d -MP -MQ build/Release/Cygwin64-Windows/lex.slip.o -Dunix -idirafter /usr/lib/gcc/x86_64-pc-cygwin/4.8.2/../../../../include/w32api -idirafter ../../include/w32api lex.slip.cpp -quiet -dumpbase lex.slip.cpp -m32 -mtune=generic -march=x86-64 -auxbase-strip build/Release/Cygwin64-Windows/lex.slip.o -O2 -version -o /Users/SKIDMA~1/AppData/Local/Temp/cceotobc.s GNU C++ (GCC) version 4.8.2 (x86_64-pc-cygwin) compiled by GNU C version 4.8.2, GMP version 5.1.3, MPFR version 3.1.2, MPC version 1.0.1 warning: GMP header version 5.1.3 differs from library version 6.0.0. warning: MPC header version 1.0.1 differs from library version 1.0.2. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 ignoring nonexistent directory "/usr/local/include" ignoring nonexistent directory "/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/../../../../x86_64-pc-cygwin/include" ignoring nonexistent directory "../../include/w32api" #include "..." search starts here: #include <...> search starts here: /usr/lib/gcc/x86_64-pc-cygwin/4.8.2/include/c++ /usr/lib/gcc/x86_64-pc-cygwin/4.8.2/include/c++/x86_64-pc-cygwin /usr/lib/gcc/x86_64-pc-cygwin/4.8.2/include/c++/backward /usr/lib/gcc/x86_64-pc-cygwin/4.8.2/include /usr/lib/gcc/x86_64-pc-cygwin/4.8.2/include-fixed /usr/include /usr/lib/gcc/x86_64-pc-cygwin/4.8.2/../../../../include/w32api End of search list. GNU C++ (GCC) version 4.8.2 (x86_64-pc-cygwin) compiled by GNU C version 4.8.2, GMP version 5.1.3, MPFR version 3.1.2, MPC version 1.0.1 warning: GMP header version 5.1.3 differs from library version 6.0.0. warning: MPC header version 1.0.1 differs from library version 1.0.2. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: 27af4e0f8f5507fac0b808974a6aef77 In file included from lex.Slip.c:754:0: /usr/lib/gcc/x86_64-pc-cygwin/4.8.2/include/c++/cstdlib:178:10: error: expected unqualified-id before '__int128' inline __int128 ^ make: *** [build/Release/Cygwin64-Windows/lex.slip.o] Error 1 nbproject/Makefile-Release.mk:348: recipe for target 'build/Release/Cygwin64-Windows/lex.slip.o' failed COMPILE FILE FAILED (exit value 2, total time: 510ms) ============================================================================ ======