https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93419
Bug ID: 93419 Summary: __has_attribute(ifunc) false positive on hurd and kfreebsd Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: preprocessor Assignee: unassigned at gcc dot gnu.org Reporter: fabian-gcc at kloetzl dot info Target Milestone: --- Hi all, Hereby I am forwarding a bug I filed against Debian [1]. One of my packages there failed to build on hurd-i386 and kfreebsd-* due to unsupported ifuncs. However, I had that code guarded by __has_attribute(ifunc) which, unfortunately, evaluates to 1 on said platforms. A minimal testcase is given below. Best, Fabian 1: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=945133 ----- #include <stdio.h> int main() { return 0; } #if __has_attribute(ifunc) typedef void (fntype)(void); fntype* fn_select(void) { return NULL; } void fn(void) __attribute__((ifunc("fn_select"))); #endif