[Bug other/96628] New: Feature request: __attribute__((no_builtin(Foo)))

2020-08-15 Thread rafael_andreas at hotmail dot com
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: ---

[Bug other/96628] Feature request: __attribute__((no_builtin("Foo")))

2020-08-15 Thread rafael_andreas at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96628

Rafaël Kooi  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  ---
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.

[Bug debug/96635] New: Feature request: PDB support

2020-08-16 Thread rafael_andreas at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96635

Bug ID: 96635
   Summary: Feature request: PDB support
   Product: gcc
   Version: 10.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: debug
  Assignee: unassigned at gcc dot gnu.org
  Reporter: rafael_andreas at hotmail dot com
  Target Milestone: ---

A few years ago Microsoft has made parts of their PDB implementation public
(https://github.com/microsoft/microsoft-pdb), and PDB support is pretty much
complete in LLVM.
I think this is very useful information to implement PDB support in GCC and
further increase compatibility with the MSVC compiler.

The primary usecase for this feature is minidump support on Windows for post
mortem debugging. A user can write a crash reporting program that sends a
minidump over to the user's server(s) and then view the crash using WinDBG for
post mortem debugging. This feature will primarily be of interest to
organizations and companies, but is of interest to anybody wishing to increase
stability on Windows.

[Bug other/96628] Feature request: __attribute__((no_builtin("Foo")))

2020-08-16 Thread rafael_andreas at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96628

--- Comment #3 from Rafaël Kooi  ---
(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?

[Bug other/96628] Feature request: __attribute__((no_builtin("Foo")))

2020-08-16 Thread rafael_andreas at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96628

--- Comment #5 from Rafaël Kooi  ---
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.