public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/115311] New: -fno-builtin-xxx allowing anything for xxx
@ 2024-05-31 17:34 gjl at gcc dot gnu.org
  2024-05-31 20:39 ` [Bug c/115311] " jsm28 at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: gjl at gcc dot gnu.org @ 2024-05-31 17:34 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 115311
           Summary: -fno-builtin-xxx allowing anything for xxx
           Product: gcc
           Version: 14.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gjl at gcc dot gnu.org
  Target Milestone: ---

Test case:

echo "" | gcc -xc - -S -fno-builtin-isinfff

This should rather complain that isinfff is not a valid built-in to disable.

Marked as a "c" flaw as the logic is in c-family.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/115311] -fno-builtin-xxx allowing anything for xxx
  2024-05-31 17:34 [Bug c/115311] New: -fno-builtin-xxx allowing anything for xxx gjl at gcc dot gnu.org
@ 2024-05-31 20:39 ` jsm28 at gcc dot gnu.org
  2024-06-01  9:28 ` gjl at gcc dot gnu.org
  2024-06-03  6:57 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2024-05-31 20:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Joseph S. Myers <jsm28 at gcc dot gnu.org> ---
This definitely wouldn't work for glibc; we freely use -fno-builtin-<func> 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-<func> 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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/115311] -fno-builtin-xxx allowing anything for xxx
  2024-05-31 17:34 [Bug c/115311] New: -fno-builtin-xxx allowing anything for xxx gjl at gcc dot gnu.org
  2024-05-31 20:39 ` [Bug c/115311] " jsm28 at gcc dot gnu.org
@ 2024-06-01  9:28 ` gjl at gcc dot gnu.org
  2024-06-03  6:57 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: gjl at gcc dot gnu.org @ 2024-06-01  9:28 UTC (permalink / raw)
  To: gcc-bugs

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

Georg-Johann Lay <gjl at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #2 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
Thanks for the explanation; so it's a feature rather than a bug.  Closing as
won't fix.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c/115311] -fno-builtin-xxx allowing anything for xxx
  2024-05-31 17:34 [Bug c/115311] New: -fno-builtin-xxx allowing anything for xxx gjl at gcc dot gnu.org
  2024-05-31 20:39 ` [Bug c/115311] " jsm28 at gcc dot gnu.org
  2024-06-01  9:28 ` gjl at gcc dot gnu.org
@ 2024-06-03  6:57 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-06-03  6:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-06-03  6:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-31 17:34 [Bug c/115311] New: -fno-builtin-xxx allowing anything for xxx gjl at gcc dot gnu.org
2024-05-31 20:39 ` [Bug c/115311] " jsm28 at gcc dot gnu.org
2024-06-01  9:28 ` gjl at gcc dot gnu.org
2024-06-03  6:57 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).