[Bug c/115311] -fno-builtin-xxx allowing anything for xxx

2024-05-31 Thread jsm28 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115311

--- Comment #1 from Joseph S. Myers  ---
This definitely wouldn't work for glibc; we freely use -fno-builtin- when
e.g. aliasing double and long double functions when the formats are the same,
where GCC gives an error if it has the functions as built-in and so objects to
the incompatible types, and we don't limit this to the functions GCC has as
built-in in a particular version but also use those options for functions that
might be built-in in future (e.g. C23 functions). The number of functions
involved is large, needing configure tests for all of them would be a bad idea.
That is, it's useful to use -fno-builtin- for a valid function name that
might be built-in in future without needing configure tests for whether it's
built-in in a particular version.

[Bug c/115311] -fno-builtin-xxx allowing anything for xxx

2024-06-01 Thread gjl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115311

Georg-Johann Lay  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #2 from Georg-Johann Lay  ---
Thanks for the explanation; so it's a feature rather than a bug.  Closing as
won't fix.

[Bug c/115311] -fno-builtin-xxx allowing anything for xxx

2024-06-02 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115311

--- Comment #3 from Richard Biener  ---
Note we handle -Wno-xyz similarly, but of course a typo like -fno-builtin-sun
(s/sun/sin) isn't noticed this way which is the drawback.