Bug 102916 - __builtin_expect() change breaks assert() in C++ programs
Summary: __builtin_expect() change breaks assert() in C++ programs
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: glibc
Version: 1.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
: 103017 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-08-22 16:47 UTC by Elliot Lee
Modified: 2016-11-24 15:05 UTC (History)
4 users (show)

Fixed In Version: 2.3.2-77
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-08-27 13:55:58 UTC
Embargoed:


Attachments (Terms of Use)

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. ***


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