[PATCH] Include safe-ctype.h after C++ standard headers, to avoid over-poisoning

2023-09-28 Thread Dimitry Andric
t transitive includes than libstdc++, and some of those transitive includes pull in various ctype declarations (typically via ). There was already a special case for including before safe-ctype.h, so move the rest of the C++ standard header includes to the same location, to fix the problem

[PING][PATCH] Include safe-ctype.h after C++ standard headers, to avoid over-poisoning

2023-10-26 Thread Dimitry Andric
Ping. It would be nice to get this QoL fix in. -Dimitry > On 28 Sep 2023, at 18:37, Dimitry Andric wrote: > > Ref: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111632 > > When building gcc's C++ sources against recent libc++, the poisoning of > the ctype macros due to

Re: [PATCH] Include safe-ctype.h after C++ standard headers, to avoid over-poisoning

2024-03-06 Thread Dimitry Andric
org/bugzilla/attachment.cgi?id=57639 : commit 49222b98ac8e30a4a042ada0ece3d7df93f049d2 Author: Dimitry Andric Date: 2024-03-06T23:46:27+01:00 Fix libcc1plugin and libc1plugin to use INCLUDE_VECTOR before including system.h, instead of directly including , to avoid running into poison

[PATCH] Fix libcc1plugin and libc1plugin to avoid poisoned identifiers

2024-03-07 Thread Dimitry Andric
Ref: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111632 Use INCLUDE_VECTOR before including system.h, instead of directly including , to avoid running into poisoned identifiers. Signed-off-by: Dimitry Andric --- libcc1/libcc1plugin.cc | 3 +-- libcc1/libcp1plugin.cc | 3 +-- 2 files changed

Re: [PATCH] Fix libcc1plugin and libc1plugin to avoid poisoned identifiers

2024-03-13 Thread Dimitry Andric
On 13 Mar 2024, at 12:30, Iain Sandoe wrote: > >> On 7 Mar 2024, at 16:48, Dimitry Andric wrote: >> >> Ref: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111632 >> >> Use INCLUDE_VECTOR before including system.h, instead of directly >> including , to

[PATCH] Use INCLUDE_xxx macros in gcov.c for pulling in standard C++ headers

2017-01-21 Thread Dimitry Andric
As discussed with the FreeBSD gcc ports maintainer [1], building trunk gcc with libc++ requires standard C++ headers to be included *before* gcc/system.h, otherwise the redefinition of abort() to fancy_abort() will cause trouble. In r235362, most gcc C++ sources were updated to define INCLUDE_xxx

[PATCH] Fix gcc-5-branch build with libc++

2017-01-31 Thread Dimitry Andric
). Proposed ChangeLog entry: 2017-01-31 Dimitry Andric * system.h: For C++, always include . * graphite-isl-ast-to-gimple.c: Include standard C++ headers before system.h. * auto-profile.c: Likewise. Also remove string.h, since it is already included in system.h

Re: [PATCH] Fix gcc-5-branch build with libc++

2017-01-31 Thread Dimitry Andric
On 01 Feb 2017, at 01:23, David Edelsohn wrote: ... >> In trunk r235362, most gcc C++ sources were updated to define >> INCLUDE_xxx macros before including gcc/system.h, which fixes the >> incompatibility with libc++. However, this revision is most likely too >> disruptive to backport to the gcc-

[PATCH] config.host: add crtbeginT.o to extra_parts for FreeBSD [PR118685]

2025-01-28 Thread Dimitry Andric
Ref: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118685 This ensures that gcc uses its own crt objects for static linking. Otherwise, it could mix the base system's crtbeginT.o with libgcc's crtend.o, leading to possible segfaults. Signed-off-by: Dimitry Andric --- libgcc/confi