Bug 102916
| Summary: | __builtin_expect() change breaks assert() in C++ programs | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Raw Hide | Reporter: | Elliot Lee <sopwith> |
| Component: | glibc | Assignee: | Jakub Jelinek <jakub> |
| Status: | CLOSED RAWHIDE | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 1.0 | CC: | 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: | |||
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. *** |
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++.