1
0
mirror of https://github.com/skeeto/w64devkit.git synced 2026-10-24 17:39:18 +03:00
Files
Christopher Wellons f28b0d02f9 Overload C functions on argument type with gnu::overloadable
Clang has an "overloadable" attribute that lets several C functions
share a name, chosen between by argument type, with C++ name mangling
applied so that the symbols stay distinct. GCC rejected the idea
upstream, so carry it here for the shipped compiler. The patch header
explains the implementation; in short, overload sets reuse the binding
chain pushdecl already maintains, a call is resolved beside the
type-directed overloading GCC does for the __atomic builtins, and
mangling is a new C-subset Itanium writer, since cp/mangle.cc is a
cc1plus object that would silently mangle C function types wrong.

Mangling matches g++ byte for byte across the types C can express, at
both -m32 and -m64, substitution compression and stdcall decoration
included. Dispatch agrees with Clang 23 on every case tried. The C
testsuite passes 42100 tests with no failures, the patched compiler
still builds libgcc and libstdc++, and the gcc.exe from a full kit
build passes the whole test corpus.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-19 11:39:07 -04:00
..
2025-04-24 17:30:03 -04:00
2026-04-05 22:03:30 -04:00
2025-10-17 22:40:59 -04:00
2026-05-25 20:53:35 -04:00
2026-05-25 20:53:35 -04:00
2023-12-23 14:40:29 -05:00