A standalone "#include <set>" breaks the build on Fedora 32 with error: exception specification in declaration does not match previous declaration malloc|calloc|realloc
Categories
(Core :: Memory Allocator, defect)
Tracking
()
People
(Reporter: mstange, Unassigned)
Details
If the first #include in a compilation unit is #include <set>
, or any other header that includes "mozalloc.h" before including <cstdlib>, then the build breaks on Fedora 32 on Bob Clary's machine. See bug 1635803 comment 0 for the full error message.
The cause of the error boils down to the following. This order of declaring malloc seems to be fine:
extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__))
__attribute__ ((__warn_unused_result__));
extern "C" __attribute__((visibility("default"))) void* malloc(size_t);
But the reverse order is rejected, with the error "exception specification in declaration does not match previous declaration".
Including just <set>, with nothing that includes <cstdlib> before, produces the wrong order.
See bug 1635803 comment 5 for the include paths from <set> that produce this order.
I'm going to land a workaround for now, but I'm a bit surprised that this issue isn't hit elsewhere in the tree.
Comment 1•5 years ago
|
||
The severity field is not set for this bug.
:glandium, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•2 years ago
|
Comment 2•2 years ago
|
||
I think this was fixed in bug 1648340.
Description
•