https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111058
Bug ID: 111058 Summary: __builtin_nans (and its friends) compiles to an external call to __builtin_nans for unsupported tag Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: xry111 at gcc dot gnu.org Target Milestone: --- double test(void) { return __builtin_nans("xxx"); } compiles to: test: .LFB0: .cfi_startproc leaq .LC0(%rip), %rdi jmp __builtin_nans@PLT .cfi_endproc We should refer to "nans" instead of "__builtin_nans" in the generated code. Though nans does not exist in libm for now, it may be added into a future libm version or the user can provide their own nans implementation.