Hacker GitHub

← All repos

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

Mentions per year 122 mentions · busiest year 2014 (14)
20082026
  1. …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…
  2. …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 -
  3. …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...
  4. …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
  5. …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
  6. …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
  7. …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…
  8. …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
  9. 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
  10. …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
  11. …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
  12. …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
  13. …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…
  14. …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
  15. …It also removes calls to printf("") and changes single character printf calls to putchar calls See https://github.com/gcc-mirror/gcc/blob/ef32bd8c866a1b8a97f62...
  16. …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
  17. …of precedence as specified in the grammar, rather than using an operator-precedence technique". https://github.com/gcc-mirror/gcc/commit/b8b94c5ba81744d325f...
  18. …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…
  19. …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'?
  20. 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
  21. …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)
  22. Upd: searching in the github mirror by the commit hash from the issue, found that https://github.com/gcc-mirror/gcc/commit/1e3312a25a7b34d6e3f... is in fact in the 'releases/gcc-14.1.0' tag. Even weirder that this one got swept under the…
    comment by crabique · 2024-05-07 · in GCC 14.1
  23. …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
  24. …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
  25. https://github.com/gcc-mirror/gcc/blob/master/libgcc/config/... So, yes when targeting VFP math. NEON already always works in this mode though.
  26. …[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++
  27. …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…
  28. 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
  29. 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...
  30. …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…
  31. 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…
  32. …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
  33. …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
  34. _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
  35. 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
  36. …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…
  37. …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...
  38. …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
  39. …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
  40. …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
  41. …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…
  42. …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...
  43. 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
  44. …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-...
  45. …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...
  46. …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…
  47. …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....
  48. …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
  49. …to the runtime exception. [1] https://ubuntu.com/blog/quetzal-is-taking-flight-update-on-u... [2] https://github.com/gcc-mirror/gcc/blob/6599da043e22e96ac830f... [3] https://www.fsf.org/news/2009-01-gcc-exception [4]…
  50. …"shrink wrapping". MSVC may do it more aggressively when profile information is available. See https://github.com/gcc-mirror/gcc/blob/master/gcc/shrink-wra... or https://llvm.org/doxygen/ShrinkWrap_8cpp_source.html .
    comment by neerajsi · 2021-07-12 · in It’s Not Always iCache