r/gcc • • Nov 22 '25

Clang is adding the `defer` keyword to C, is gcc doing the same?

61 Upvotes

I saw that clang is adding the defer keyword to c.

PR: https://github.com/llvm/llvm-project/pull/162848

Specification: https://thephd.dev/_vendor/future_cxx/technical%20specification/C%20-%20defer/C%20-%20defer%20Technical%20Specification.pdf

Is gcc planning to do the same? I couldn't or don't know where to look to find an issue tracker on this or a discussion.


r/gcc • • Jun 17 '26

I'd just like to say thank you to the gcc dev community

43 Upvotes

I've been working on a high-impact project for the past couple years that's led me further into C, infosec, and compilers than I ever thought I wanted to be. GCC has been my companion the entire way. I am old, and I am oldschool. I don't have makefiles, I don't do git, and my IDE is Xed with C code highlighting turned off because I don't like it doubling up my quotes for me. My first programming language was Visual Basic 3 when VB3 was new and hot.

This morning I reached the final stage, and I just pushed a 1.1MB, zero dependency -O3 static binary to my test server for stressing. Version 1.8, bumped from 1.7.16, where the whole 1.7 series has been running in prod on a website with ~1.1M monthly users. When it passes it'll go to prod and become a release candidate a month after that. Two years of my life, 2200 lines of code, and my own invention that doesn't exist anywhere else are finally about to go Gold.

GCC is built the way I like my tools to be built: Simple, easy to understand at a basic level, flexible if you want to get fancy, and obscenely powerful without rubbing your nose in it. It is bar-none my favorite C compiler and I would not have come this far if I had to put up with the bullshit of Clang, VSCode, Code:Blocks, or others. I love a Swiss army knife, but abhor a "Swiss army laser chainsaw with mandatory tactical nukes and shark robot features." And I don't need no stinking AI anything. Even code completion annoys me.

Yes I have a beard and yes its turning grey. But from the bottom of my heart to the GCC devs - I thank you all the same.


r/gcc • • Oct 06 '14

GCC needs YOU!

Thumbnail gcc.gnu.org
35 Upvotes

r/gcc • • Apr 30 '26

GCC 16.1 Released

Thumbnail gcc.gnu.org
30 Upvotes

r/gcc • • Jan 04 '26

Beyond Syntax: Introducing GCC Workbench for VSCode/VSCodium

Thumbnail
gallery
30 Upvotes

If you work with GCC internals, you probably know the struggle of staring at massive, unreadable RTL and GIMPLE dumps.

I’ve been developing GCC Workbench. You might have seen it early on when it was just a simple extension called gcc-syntax-highlighting, but i’m trying to add more things to it. It’s no longer just about colors; it’s about making the compiler's intermediate representation actually navigable.

What it does now:

  • Source <-> RTL: Godbolt style source to rtl visualisation.

  • Hovers: Hover over any MD, RTL or GIMPLE/Tree code to see its documentation pulled directly from GCC source definitions.

  • Deep Navigation: Ctrl+Click on md iterators or attributes to jump to their definitions instantly.

  • Backend Support: Full semantic highlighting for .rtl, .t, .i, and .md (Machine Description) files.

  • Control Flow Graph: compiler c/c++ file with -fdump-gimple/rtl-passname-graph to generate .dot files, and click to visualize pass with cfg.

  • Qualituy of life buttons on editor/title.. (Compare with previous pass/ Noise filter/cfg-view)..

Checkout upcoming new things in TODO.

I’m building this to be the professional workbench experience that compiler engineers have been missing. Check it out on GitHub, and if it saves you some gray hairs, consider supporting the work via the coffee link in the README.

GitHub: https://github.com/regalloc/gcc-workbench

Quit grepping. Save your cycles for high-value development.

Thank You.


r/gcc • • Dec 03 '25

Strange behaviour of -ffinite-math-only in GCC 14 and 15

29 Upvotes

Disclaimer - it's not a production code, but something I've noticed while playing with Compiler Explorer.

It looks as if starting with version 14 using-ffinite-math-only options generates much longer code, which is unintuitive.

I would appreciate if someone explained why it works like that.

Godbolt link: https://godbolt.org/z/7jz8o3aKs

Input:

float min(float a, float b) {
    return a < b ? a : b;
}

With just -O2 generated code looks as expected

Compiler: x86-64 gcc 15.2, options: -O2

Output:

min(float, float):
        minss   xmm0, xmm1
        ret

Enabling -ffinite-math-only generates much longer assembly output

Compiler: x86-64 gcc 15.2, options: -O2 -ffinite-math-only

Output:

min(float, float):
        movaps  xmm2, xmm0
        movaps  xmm0, xmm1
        cmpless xmm0, xmm2
        andps   xmm1, xmm0
        andnps  xmm0, xmm2
        orps    xmm0, xmm1
        ret

Adding -funsafe-math-optimizations flag makes assembly short again

Compiler: x86-64 gcc 15.2, options: -O2 -funsafe-math-optimizations -ffinite-math-only

Output:

min(float, float):
        minss   xmm0, xmm1
        ret

Switching to an older version of GCC also "fixes" the problem

Compiler: x86-64 gcc 13.4, options: -O2 -ffinite-math-only

Output:

min(float, float):
        minss   xmm0, xmm1
        ret

What's also interesting is that the max function doesn't seem to show the same behaviour.

Best,

Piotr


r/gcc • • Dec 27 '14

GCC 5 is C++14 language feature-complete

Thumbnail gcc.gnu.org
27 Upvotes

r/gcc • • Sep 11 '26

GCC 13.5 Released with 256+ bugs fixed, closing the release series.

Thumbnail gcc.gnu.org
26 Upvotes

r/gcc • • Jul 11 '22

GCC Rust front-end approved by GCC Steering Committee

Thumbnail gcc.gnu.org
25 Upvotes

r/gcc • • Jan 25 '18

GCC 7.3 Released

Thumbnail gcc.gnu.org
23 Upvotes

r/gcc • • Apr 28 '16

GCC 6.1 Released

Thumbnail gcc.gnu.org
23 Upvotes

r/gcc • • Jan 12 '21

Embecosm: GCC-Rust Development Plan

Thumbnail
embecosm.com
22 Upvotes

r/gcc • • Aug 07 '26

GCC 16.2 Released

Thumbnail gcc.gnu.org
20 Upvotes

r/gcc • • Jul 29 '26

GCC AI Policy Announcement

Thumbnail gcc.gnu.org
20 Upvotes

r/gcc • • Apr 08 '21

GCC 10.3 Released

Thumbnail gcc.gnu.org
20 Upvotes

r/gcc • • Aug 14 '17

GCC 7.2 Released

Thumbnail gcc.gnu.org
20 Upvotes

r/gcc • • Nov 12 '14

Just-In-Time Compilation Library Merged Into Trunk.

Thumbnail gcc.gnu.org
20 Upvotes

r/gcc • • Apr 26 '14

GCC Explorer

Thumbnail
gcc.godbolt.org
20 Upvotes

r/gcc • • Jun 12 '26

GCC 15.3 Released - more than 208 bug fixes

Thumbnail gcc.gnu.org
19 Upvotes

r/gcc • • Dec 16 '20

C++ 20 modules lands in GCC

Thumbnail gcc.gnu.org
19 Upvotes

r/gcc • • Sep 19 '20

GNU Binutuls 2.35.1 point release is now available

Thumbnail sourceware.org
19 Upvotes

r/gcc • • May 19 '20

gcc moves to C++11

Thumbnail
github.com
19 Upvotes

r/gcc • • May 07 '20

GCC 10.1 Released

Thumbnail gcc.gnu.org
19 Upvotes

r/gcc • • Jan 10 '20

GCC Converting to Git This Weekend

Thumbnail
phoronix.com
19 Upvotes

r/gcc • • Apr 26 '23

GCC 13.1 Released

Thumbnail gcc.gnu.org
18 Upvotes