there is as bug in gcc version 3.0 til 3.3.2 that has been addressed in gcc 3.3.3 that makes C++ programs using assert.h assert errouneously. This can be resolved by fixing the assert.h to not use the builtin_expect optimization or upgrading the compiler to 3.3.3. Look at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13239 for a deeper discussion of the problem and example that shows how it breaks. I just wanted to make you aware of it in case you want to build your distribution on the gcc 3.3.2 compiler so that you are aware of this issue in advance. A library where this causes problems and which is contained in your ebuild is e.g. media-libs/coin. cheers, Tamer. Reproducible: Always Steps to Reproduce: compile the following with 'g++ -o moo moo.cpp': #include <assert.h> struct Y { Y () : _y(0) {} //Y (const Y& y) : _y(y._y) {} int _y; }; bool foo() { return true; } Y bar() { return Y(); } int main() { assert (bar()._y==0); assert ( foo() && (bar()._y)==0 ); return 0; } Actual Results: moo: moo.cpp:15: int main(): Assertion `foo() && (bar()._y)==0' failed. Aborted $ echo $? 134 Expected Results: if you remove the builtin_expect occurences from assert.h it should behave like so: $ ./moo $ echo $? 0
i guess we can set this one to resolved now since the default gcc on gentoo is now 3.3.3.
Closing bug per bug reporters request.