Red Hat Bugzilla – Bug 102916
__builtin_expect() change breaks assert() in C++ programs
Last modified: 2007-04-18 12:57:04 EDT
Something changed with gcc's idea of the declaration of __builtin_expect to expect the first
argument to be a 'long int'. assert() uses __builtin_expect() for an optimization. All C++
programs using assert(apointer) now fail to compile. To reproduce:
int main(int argc, char **argv)
And compile as C++.
AFAIK, it's a bug in assert.h that will be fixed whenever we pull glibc cvs again.
*** Bug 103017 has been marked as a duplicate of this bug. ***