Bug 102916 - __builtin_expect() change breaks assert() in C++ programs
__builtin_expect() change breaks assert() in C++ programs
Product: Red Hat Raw Hide
Classification: Retired
Component: glibc (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
: 103017 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2003-08-22 12:47 EDT by Elliot Lee
Modified: 2007-04-18 12:57 EDT (History)
3 users (show)

See Also:
Fixed In Version: 2.3.2-77
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-08-27 09:55:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Elliot Lee 2003-08-22 12:47:46 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:

#include <assert.h>
int main(int argc, char **argv)
  return 0;

And compile as C++.
Comment 1 Bill Nottingham 2003-08-22 16:39:55 EDT
AFAIK, it's a bug in assert.h that will be fixed whenever we pull glibc cvs again.
Comment 2 Bill Nottingham 2003-08-25 11:36:25 EDT
*** Bug 103017 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.