public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/96628] New: Feature request: __attribute__((no_builtin(Foo)))
@ 2020-08-16  0:08 rafael_andreas at hotmail dot com
  2020-08-16  0:18 ` [Bug other/96628] Feature request: __attribute__((no_builtin("Foo"))) rafael_andreas at hotmail dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: rafael_andreas at hotmail dot com @ 2020-08-16  0:08 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 96628
           Summary: Feature request: __attribute__((no_builtin(Foo)))
           Product: gcc
           Version: 10.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rafael_andreas at hotmail dot com
  Target Milestone: ---

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

* [Bug other/96628] Feature request: __attribute__((no_builtin("Foo")))
  2020-08-16  0:08 [Bug other/96628] New: Feature request: __attribute__((no_builtin(Foo))) rafael_andreas at hotmail dot com
@ 2020-08-16  0:18 ` rafael_andreas at hotmail dot com
  2020-08-16  7:19 ` schwab@linux-m68k.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rafael_andreas at hotmail dot com @ 2020-08-16  0:18 UTC (permalink / raw)
  To: gcc-bugs

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

Rafaël Kooi <rafael_andreas at hotmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rafael_andreas at hotmail dot com
            Summary|Feature request:            |Feature request:
                   |__attribute__((no_builtin(F |__attribute__((no_builtin("
                   |oo)))                       |Foo")))

--- Comment #1 from Rafaël Kooi <rafael_andreas at hotmail dot com> ---
Clang supports __attribute__((no_builtin("memset"))) for things like
implementing memset in a CRT. This is preferable over using -fno-builtin cause
it disables all builtins, which is not optimal when it comes to possible
optimizations.

I also wasn't able to find out how to disable a specific builtin from the
commandline, which could be used as a workaround by just splitting functionally
up into more files.

Right now my CRT project doesn't work with GCC on Windows because of reliance
on this attribute, msvc ABI, and SEH support, but I would like to be able to
also compile it with GCC for portability reasons and this would be a big step.

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

* [Bug other/96628] Feature request: __attribute__((no_builtin("Foo")))
  2020-08-16  0:08 [Bug other/96628] New: Feature request: __attribute__((no_builtin(Foo))) rafael_andreas at hotmail dot com
  2020-08-16  0:18 ` [Bug other/96628] Feature request: __attribute__((no_builtin("Foo"))) rafael_andreas at hotmail dot com
@ 2020-08-16  7:19 ` schwab@linux-m68k.org
  2020-08-16 22:43 ` rafael_andreas at hotmail dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: schwab@linux-m68k.org @ 2020-08-16  7:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Andreas Schwab <schwab@linux-m68k.org> ---
There is -fno-builtin-memset.

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

* [Bug other/96628] Feature request: __attribute__((no_builtin("Foo")))
  2020-08-16  0:08 [Bug other/96628] New: Feature request: __attribute__((no_builtin(Foo))) rafael_andreas at hotmail dot com
  2020-08-16  0:18 ` [Bug other/96628] Feature request: __attribute__((no_builtin("Foo"))) rafael_andreas at hotmail dot com
  2020-08-16  7:19 ` schwab@linux-m68k.org
@ 2020-08-16 22:43 ` rafael_andreas at hotmail dot com
  2020-08-16 22:51 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rafael_andreas at hotmail dot com @ 2020-08-16 22:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Rafaël Kooi <rafael_andreas at hotmail dot com> ---
(In reply to Andreas Schwab from comment #2)
> There is -fno-builtin-memset.

That still inserts a call to memset: https://godbolt.org/z/ovvq1T
Perhaps this feature is broken?

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

* [Bug other/96628] Feature request: __attribute__((no_builtin("Foo")))
  2020-08-16  0:08 [Bug other/96628] New: Feature request: __attribute__((no_builtin(Foo))) rafael_andreas at hotmail dot com
                   ` (2 preceding siblings ...)
  2020-08-16 22:43 ` rafael_andreas at hotmail dot com
@ 2020-08-16 22:51 ` pinskia at gcc dot gnu.org
  2020-08-17  0:32 ` rafael_andreas at hotmail dot com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2020-08-16 22:51 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
You need to use -fno-tree-loop-distribute-patterns if you are implementing
memset in C.

But this is really just a dup of bug 56888.

*** This bug has been marked as a duplicate of bug 56888 ***

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

* [Bug other/96628] Feature request: __attribute__((no_builtin("Foo")))
  2020-08-16  0:08 [Bug other/96628] New: Feature request: __attribute__((no_builtin(Foo))) rafael_andreas at hotmail dot com
                   ` (3 preceding siblings ...)
  2020-08-16 22:51 ` pinskia at gcc dot gnu.org
@ 2020-08-17  0:32 ` rafael_andreas at hotmail dot com
  2020-08-25 11:47 ` rsandifo at gcc dot gnu.org
  2023-06-03  1:17 ` [Bug c/96628] " pinskia at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rafael_andreas at hotmail dot com @ 2020-08-17  0:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Rafaël Kooi <rafael_andreas at hotmail dot com> ---
This is not a duplicate, as this first and foremost is a feature request.
memset and other functions like this are not the only candidates where this
attribute is useful.

The attribute moves complexity out of the build system, and increases
portability, and also increases compatibility with clang.

Please reopen.

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

* [Bug other/96628] Feature request: __attribute__((no_builtin("Foo")))
  2020-08-16  0:08 [Bug other/96628] New: Feature request: __attribute__((no_builtin(Foo))) rafael_andreas at hotmail dot com
                   ` (4 preceding siblings ...)
  2020-08-17  0:32 ` rafael_andreas at hotmail dot com
@ 2020-08-25 11:47 ` rsandifo at gcc dot gnu.org
  2023-06-03  1:17 ` [Bug c/96628] " pinskia at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2020-08-25 11:47 UTC (permalink / raw)
  To: gcc-bugs

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

rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rsandifo at gcc dot gnu.org
   Last reconfirmed|                            |2020-08-25
             Status|RESOLVED                    |NEW
     Ever confirmed|0                           |1
         Resolution|DUPLICATE                   |---

--- Comment #6 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Not a dup.

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

* [Bug c/96628] Feature request: __attribute__((no_builtin("Foo")))
  2020-08-16  0:08 [Bug other/96628] New: Feature request: __attribute__((no_builtin(Foo))) rafael_andreas at hotmail dot com
                   ` (5 preceding siblings ...)
  2020-08-25 11:47 ` rsandifo at gcc dot gnu.org
@ 2023-06-03  1:17 ` pinskia at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-03  1:17 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement

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

end of thread, other threads:[~2023-06-03  1:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-16  0:08 [Bug other/96628] New: Feature request: __attribute__((no_builtin(Foo))) rafael_andreas at hotmail dot com
2020-08-16  0:18 ` [Bug other/96628] Feature request: __attribute__((no_builtin("Foo"))) rafael_andreas at hotmail dot com
2020-08-16  7:19 ` schwab@linux-m68k.org
2020-08-16 22:43 ` rafael_andreas at hotmail dot com
2020-08-16 22:51 ` pinskia at gcc dot gnu.org
2020-08-17  0:32 ` rafael_andreas at hotmail dot com
2020-08-25 11:47 ` rsandifo at gcc dot gnu.org
2023-06-03  1:17 ` [Bug c/96628] " pinskia 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).