Bug 102916

Summary: __builtin_expect() change breaks assert() in C++ programs
Product: [Retired] Red Hat Raw Hide Reporter: Elliot Lee <sopwith>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0CC: drepper, fweimer, john.eckerdal, notting
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 2.3.2-77 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-08-27 13:55:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Elliot Lee 2003-08-22 16:47:46 UTC
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)
{
  assert(argv);
  return 0;
}

And compile as C++.

Comment 1 Bill Nottingham 2003-08-22 20:39:55 UTC
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 15:36:25 UTC
*** Bug 103017 has been marked as a duplicate of this bug. ***