Similar to #40338, this problem is affecting an x86. I recently "cleaned up" my Gentoo and I hope I didn't broke anything; in particular I unmerged gcc-2, so that could possibly be a cause... but maybe not! Anyway I get the following: g++ -Wall -pedantic -I/usr/include/freetype2 -march=athlon-xp -mmmx -msse -m3dnow -O2 -fomit-frame-pointer -pipe -Wall -funroll-loops -fprefetch-loop-arrays -finline-limit=1200 -falign-functions=32 -c ttmkfdir.cpp -fPIC -DPIC -o ttmkfdir.o In file included from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/stdio.h:683, from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/g++-v3/cstdio:52, from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/g++-v3/i686-pc-linux-gnu/bits/c++io.h:35, from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/g++-v3/bits/fpos.h:44, from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/g++-v3/iosfwd:46, from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/g++-v3/ios:44, from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/g++-v3/ostream:45, from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/g++-v3/iostream:45, from ttmkfdir.cpp:2: /usr/include/bits/stdio.h: In function `int getchar()': /usr/include/bits/stdio.h:42: declaration of `int getchar()' throws different exceptions /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/stdio.h:394: than previous declaration `int getchar() throw ()' and other similar errors with getc_unlocked, getchar_unlocked and so on. I tried to merge the -r4 of gcc which fixes a similar problem for the Sparc but I got no luck. I'm working around by removing -O* from CFLAGS. Just a "cosmetical" bug, but nice to get fixed anyway.
I can confirm that this is the case. After a fresh Gentoo install on my x86 and emerge system this did not work.
Hi, try again without an -O options. This fixed the issue when I ran across it.
!!! FIX FOR THIS BUG: From #gentoo-bugs : <tseng> you need to filter out -O <tseng> CFLAGS="-pipe -march=whatever" emerge ttmkfdir I ran this (with -march=i686 in my case) and ttmkfdir was succesfully emerged. Thanks to tseng!
Fixed in 3.0.9 and 3.0.9-r1 in cvs.
*** Bug 44106 has been marked as a duplicate of this bug. ***