gcc-mirror/gcc
View on GitHub ↗ ★ 11,335 C++
122 mentions on Hacker News by 108 people: 7 stories, 115 comments · first 2011-12-14 · latest 2026-09-27
20082026
-
…only need to take a look at GCC's implementation of `stddef.h` for `size_t` and `ptrdiff_t` etc. https://github.com/gcc-mirror/gcc/blob/master/gcc/ginclude/s... There's a simpler way to define these types in newer versions of C which have…
comment by sparkie · 2026-09-27 · in C's Flexible Integer Sizes Were Not a Design Mistake -
…internally. zlib even has an example of this method in its own source tree: https://github.com/gcc-mirror/gcc/blob/master/zlib/examples/... All depends on the use case of course. Seems like the author here has a pretty specific one -
comment by phiresky · 2026-04-24 · in Mounting tar archives as a filesystem in WebAssembly -
…ropics/claudes-c-compiler/blob/main/s... https://llvm.org/doxygen/LoopStrengthReduce_8cpp_source.html https://github.com/gcc-mirror/gcc/blob/master/gcc/gimple-ssa...
comment by astrange · 2026-02-06 · in We tasked Opus 4.6 using agent teams to build a C Compiler -
…complexity. The compilers also become bigger and bigger. About two days ago I cloned gcc from https://github.com/gcc-mirror/gcc . The .tar.xz sits at 3.8 GB. Granted, regular tarball releases are much smaller, e. g. 15.1.0 tar.xz at 97MB…
comment by shevy-java · 2025-12-31 · in The compiler is your best friend -
…investment. I assume the license may also play a role. For comparison, here is some related code: https://github.com/gcc-mirror/gcc/blob/master/gcc/tree-chrec... https://github.com/llvm/llvm-project/blob/release/21.x/llvm/...
comment by uecker · 2025-12-24 · in When compilers surprise you -
…to be handling different bases. [1]: https://en.cppreference.com/w/cpp/utility/from_chars.html [2]: https://github.com/gcc-mirror/gcc/blob/461fa63908b5bb1a44f12...
comment by MathMonkeyMan · 2025-10-11 · in Love C, hate C: Web framework memory problems -
…constructor's (the non-default one) has a workaround against LTO optimizing the pthread call away: https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-... > Parallelism without pthread To get __atomic_add_dispatch to work, looks…
comment by TuxSH · 2025-08-31 · in Shared_ptr<T>: the (not always) atomic reference counted smart pointer (2019) -
…by tweaking the compiler heuristics even now. Trolling through the gcc machine definitions: https://github.com/gcc-mirror/gcc/blob/master/gcc/config/i38... So, when the CPU's are heterogeneous with differing optimization targets the code…
comment by StillBored · 2025-07-08 · in Intel's Lion Cove P-Core and Gaming Workloads -
Here's the GCC implementation of `std::function`: https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-... I'm with OP here.
comment by fredrikholm · 2025-06-16 · in Simplest C++ Callback, from SumatraPDF -
…No off-by-one allowed, here. Where first is greater than last, you get a new full allocation. [0] https://github.com/gcc-mirror/gcc/blob/master/gcc/ada/libgna... [1] https://godbolt.org/z/x8Erhqn5n
comment by shakna · 2025-06-08 -
…re-uses the old allocation without copying all the data, even when there is whitespace to trim. [1] https://github.com/gcc-mirror/gcc/blob/master/gcc/ada/libgna... [2] https://github.com/gcc-mirror/gcc/blob/master/gcc/ada/libgna... [3]…
comment by whytevuhuni · 2025-06-07 -
…Slice; A pre-existing reference is returned. There is no allocation that happens whatsoever. [1] https://github.com/gcc-mirror/gcc/blob/master/gcc/ada/libgna...
comment by shakna · 2025-06-06 -
…than this wrapper. If you don't like strtol's API or error handling, just implement your own. [1]: https://github.com/gcc-mirror/gcc/blob/master/libiberty/strt... > If an overflow is detected, it calls abort() An aside, but this doesn't…
comment by cmovq · 2025-05-21 · in Ratatoi is a C libary that wraps stdlib's strtol (as atoi does), but it's evil. -
…take a well-deserved break, and I look forward to following whatever projects you pursue next. [0]: https://github.com/gcc-mirror/gcc/blob/master/MAINTAINERS
comment by benesch · 2025-05-11 · in Leaving Google -
…It also removes calls to printf("") and changes single character printf calls to putchar calls See https://github.com/gcc-mirror/gcc/blob/ef32bd8c866a1b8a97f62...
comment by Someone · 2025-04-28 · in Bare metal printf – C standard library without OS -
…Nice work though! I wouldn't even know where to start with something like this! you're a wizard [1] https://github.com/gcc-mirror/gcc/blob/master/gcc/config/m68... [2] https://www.phoronix.com/news/GCC-11-m68k-Is-Safe
comment by bogantech · 2024-12-17 · in Why GCC 1.42 on the Tektronix 4404 – with a C compiler from 1979 -
…of precedence as specified in the grammar, rather than using an operator-precedence technique". https://github.com/gcc-mirror/gcc/commit/b8b94c5ba81744d325f...
comment by bonzini · 2024-11-09 · in IronCalc – Open-Source Spreadsheet Engine -
…There are some open source C compilers such as the GNU C compiler in the GNU Compiler Collection ( https://github.com/gcc-mirror/gcc ) and Clang in the LLVM project ( https://clang.llvm.org/get_started.html ). There are also proprietary C…
comment by thesuperbigfrog · 2024-10-14 · in Is C maintained like other languages with public repo, releases and issues? -
▲ 4
Show HN: SSO – Small String Optimizationstory by feelamee · 2024-10-12 · 4 comments
-
…it hardcodes the numeric values for escapes[1], with options for ASCII or EBCDIC systems. [1] https://github.com/gcc-mirror/gcc/blob/8a4a967a77cb937a2df45...
comment by moefh · 2024-10-07 · in Whence '\n'? -
It's decided by function use_register_for_decl in gcc: https://github.com/gcc-mirror/gcc/blob/releases/gcc-12/gcc/f... With -g -O0 register is only used in special cases like using the register keyword. The memory accesses are also easily…
comment by bitcompost · 2024-08-04 · in Clang vs. Clang -
…The pointer-less version needs to do a branch there. Compare libstdc++ [1] to libc++ [2]. [1]: https://github.com/gcc-mirror/gcc/blob/065dddc/libstdc++-v3/... [2]: https://github.com/llvm/llvm-project/blob/1a96179/libcxx/inc... Basically…
comment by quuxplusone · 2024-05-08 · in Qt and C++ Trivial Relocation (Part 1) -
…that don't seem to match reality at all. Case in point, this was fixed in both major C++ libraries: https://github.com/gcc-mirror/gcc/commit/ebf6175464768983a2d... https://github.com/llvm/llvm-project/commit/4f67a909902d8ab9... So what C++…
comment by kllrnohj · 2024-03-12 · in C++ Safety, in Context -
…that makes people hate the Rust community. I wish the community mature a bit on this aspect. [^1]: https://github.com/gcc-mirror/gcc/commit/ebf6175464768983a2d... [^2]: https://github.com/llvm/llvm-project/commit/4f67a909902d8ab9...
comment by adev_ · 2024-03-12 · in C++ Safety, in Context -
https://github.com/gcc-mirror/gcc/blob/master/libgcc/config/... So, yes when targeting VFP math. NEON already always works in this mode though.
comment by account42 · 2024-01-17 · in Std: Clamp generates less efficient assembly than std:min(max,std:max(min,v)) -
…[1]. would have hoped see more answers or see something in here from actual kernel developers. 0: https://github.com/gcc-mirror/gcc/commit/5329b59a2e13dabbe20... 1: https://youtu.be/YyRVOGxRKLg?si=_ad7wU51bDdDg6Ic&t=104
comment by kwant_kiddo · 2024-01-10 · in Converting the Kernel to C++ -
…you don't sacrifice runtime overhead to be able to handwave object lifecycle management. - C++: https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-... - Rust: https://doc.rust-lang.org/beta/src/alloc/collections/linked_... > No…
comment by spease · 2023-12-02 · in Understanding Objective-C by transpiling it to C++ -
Modern GCC is also primarily written in C++, and has had C++ deps since 2013: https://github.com/gcc-mirror/gcc/blob/master/gcc/input.cc
comment by fleventynine · 2023-11-24 · in Committing to Rust for Kernel Code -
And spitbol still lives in GCC/GNAT https://gcc.gnu.org/onlinedocs/gnat_rm/GNAT-Spitbol-g-spitbo... https://github.com/gcc-mirror/gcc/blob/master/gcc/ada/libgna... https://github.com/gcc-mirror/gcc/blob/master/gcc/ada/libgna...
comment by guerby · 2023-11-12 · in Spitbol 360: an implementation of SNOBOL4 for IBM 360 compatible computers -
…nice to see a whole copy of the actual GCC binary in question :( edit: looks like it dies in this: https://github.com/gcc-mirror/gcc/blob/master/gcc/tree-switc... edit2: it also would've been nice to see the actual bytes being decoded when…
comment by eigenform · 2023-10-09 · in Mitigations=off considered harmful or spurious SIGILL on AMD Zen4 -
Lives in GNAT, GCC Ada: https://github.com/gcc-mirror/gcc/blob/master/gcc/ada/libgna... -- SPITBOL-like interface facilities -- This package provides a set of interfaces to semantic operations copied -- from SPITBOL, including a complete…
comment by guerby · 2023-05-03 · in SNOBOL (“StriNg Oriented and SymBOlic Language”) -
…the inspiration for the above example.) [1] https://en.m.wikipedia.org/wiki/Transitive_relation [2] https://github.com/gcc-mirror/gcc/commit/50ddbd0282e06614b29...
comment by bmurray7jhu · 2023-04-30 · in My favorite C compiler flags during development -
…and a uint64_t … I'm not certain that's not UB I'm 99% certain its not UB in itself, because of https://github.com/gcc-mirror/gcc/blob/master/gcc/config/i38...
comment by zokier · 2023-03-15 · in (Don't) crank up the warnings to 11 -
_m512i is defined as may_alias https://github.com/gcc-mirror/gcc/blob/master/gcc/config/i38... https://gcc.gnu.org/onlinedocs/gcc/Common-Type-Attributes.ht...
comment by zokier · 2023-03-15 · in (Don't) crank up the warnings to 11 -
The current list of hacks can be found here https://github.com/gcc-mirror/gcc/blob/master/fixincludes/in... There are 272 of them as of this comment
comment by klysm · 2022-12-31 · in Breakincludes: Fixincludes in GCC -
…are only about 30,000 LOC, depending on which files you count besides the main parser module: https://github.com/gcc-mirror/gcc/blob/master/gcc/c/c-parser... And this is code written in Cish C++. In a higher-level language it could be…
comment by foldr · 2022-12-18 · in SQLite internals: How the most-used database works -
…In contrast, libgcc, which gcc links into generated binaries, contains non-trivial routines[0]. [0] https://github.com/gcc-mirror/gcc/blob/master/libgcc/libgcc2...
comment by ronsor · 2022-11-16 · in Mold linker may not switch to a source-available license -
…available that they could use instead if they don't want to implement float parsing themselves. [0] https://github.com/gcc-mirror/gcc/blob/master/libstdc++-v3/s... [1] https://github.com/fastfloat/fast_float
comment by account42 · 2022-09-07 · in Someone’s Been Messing with My Subnormals -
…with better commit messages: Linux kernel: https://github.com/torvalds/linux/commits/master gcc: https://github.com/gcc-mirror/gcc/commits/master Perl: https://github.com/Perl/perl5/commits/blead Wayland:…
comment by greaterthan3 · 2022-08-28 · in I like Odin -
…There's really quite a lot of documentation and published papers when you actually look: https://github.com/gcc-mirror/gcc/blob/751f306688508b08842d0...
comment by chrisseaton · 2022-06-13 · in Diving into GCC Internals -
…nothing for desktop/server applications, but it's not convenient for a MCU with 64KB of flash. (1): https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-... > just use a factory function instead This is practical with an efficient…
comment by scoutt · 2022-05-17 · in Common libraries and data structures for C -
…judicious rewrite rules like (X ^ Y) ^ Y -> X [0] are enough for the xor swap trick as well. [0] https://github.com/gcc-mirror/gcc/blob/9fdac7e16c940fb6264e6...
comment by a_e_k · 2022-03-24 · in Swapping two Numbers without Temporary Variables -
GNU C++ Standard Library: https://github.com/gcc-mirror/gcc/tree/master/libstdc%2B%2B-...
comment by thesuperbigfrog · 2022-03-12 · in Ask HN: Professional Implementations of Algorithms -
…calls. libc++: https://github.com/llvm-mirror/libcxx/blob/master/src/new.cp... libstdc++: https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-...
comment by maximilianburke · 2022-02-23 · in “Sustainability with Rust” post misleading about Go -
…Ada++ -- https://github.com/AdaPlusPlus/gcc/commits/master GCC 10 (history from April 2021) -- https://github.com/gcc-mirror/gcc/commits/releases/gcc-10?af...
comment by lolinder · 2022-02-02 · in AdaCore and Ferrous Systems Joining Forces to Support Rust -
…And of course the compiler backend for Ada/SPARK is GNU GCC, written in unverified C: https://github.com/gcc-mirror/gcc/tree/master/gcc/config Compare with CompCert, the formally verified C compiler: https://github.com/AbsInt/CompCert…
comment by dandotway · 2022-01-02 · in Why the C Language Will Never Stop You from Making Mistakes -
▲ 2
GCC Adds Support for Moldstory by hasheddan · 2021-12-30 · 0 comments
-
…would minimizing the number of loads/stores (or unrolling the loop) really matter that much? [1]: https://github.com/gcc-mirror/gcc/blob/master/libgcc/memcpy....
comment by OskarS · 2021-11-12 · in A 100LOC C impl of memset, that is faster than glibc's -
…like some operator precedence parsing involving an explicit stack: Shunting-Yard or similar?) https://github.com/gcc-mirror/gcc/blob/master/gcc/cp/parser.... Let's switch over to embedded. Have you heard of BusyBox? BusyBox provides scaled…
comment by kazinator · 2021-09-24 · in Programming Puzzles