Skip to content

Improve compat with modern GCC and libstdc++

Milian Wolff requested to merge work/gcc-compat-malloc into master

Workaround for the following bogus parse errors reported by libclang:

/usr/include/stdlib.h:566:5: error: use of undeclared identifier '__builtin_free'; did you mean '__builtin_frexp'?
/usr/include/stdlib.h:566:5: note: '__builtin_frexp' declared here
/usr/include/stdlib.h:566:5: error: '__malloc__' attribute takes no arguments
/usr/include/stdlib.h:570:14: error: '__malloc__' attribute takes no arguments
/usr/include/stdlib.h:799:6: error: use of undeclared identifier '__builtin_free'; did you mean '__builtin_frexp'?
/usr/include/stdlib.h:566:5: note: '__builtin_frexp' declared here
/usr/include/stdlib.h:799:6: error: '__malloc__' attribute takes no arguments

And:

call to '__builtin_operator_delete' selects non-usual deallocation function

Merge request reports