https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119874

            Bug ID: 119874
           Summary: d: Recognize user-defined prototypes of built-in
                    functions
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: d
          Assignee: ibuclaw at gdcproject dot org
          Reporter: ibuclaw at gcc dot gnu.org
  Target Milestone: ---

D matches and maps C library functions to GCC built-ins, for example:
```
extern(C) real logl(real);

return logl(1);
```

Is replaced with `__builtin_logl(1)`, likewise mismatches in the prototype are
detected too.
```
extern(C) real logl();
// warning: conflicting types for built-in function ‘logl’;
// expected ‘extern (C) real(real)’
```

However, this does not happen for prototypes of __builtin functions themselves.
```
extern(C) real __builtin_logl();

return __builtin_logl();
// undefined reference to `__builtin_logl'
```

Reply via email to