Sean Murthy · @smurthys
177 followers · 2088 posts · Server hachyderm.io

A C23, GCC question: The first line of code here causes `-Wold-style-declaration` warning in GCC 13.1. Is this warning because GCC's C23 implementation of placeholder type `auto` is not yet complete?

sigcpp.godbolt.org/z/6Yos9oMch

#c #c23 #programming #godbolt

Last updated 1 year ago

Sean Murthy · @smurthys
174 followers · 2074 posts · Server hachyderm.io

Dev: decltype(n) and typeof(n) for "strong typing"
C, C++: error: increment of read-only variable '**i**'
Dev: Not like that

(Sure, range-for avoids the issue **in this case** but you've to admit that the core issue is sneaky. Also, there is no range-for in C.)

sigcpp.godbolt.org/z/zsfTszW4d

#c #cpp #cplusplus #godbolt

Last updated 1 year ago

Sean Murthy · @smurthys
172 followers · 2068 posts · Server hachyderm.io

Programmatically enabling assertions in Java, even if assertions are not enabled on the cmd line when JVM was started (`-ea` was not included in the cmd line).

Works for classes yet to be loaded by a specific class loader. For illustration, uses the loader for the class containing the `main` method.

Results subject to any selective enabling/disabling of assertions on command line. See Java docs.

CE: sigcpp.godbolt.org/z/bE34a5E6f

#java #programming #godbolt

Last updated 1 year ago

Chris Offner :verified: · @chrisoffner3d
198 followers · 774 posts · Server sigmoid.social

What's the best and most convenient way to look at how translates to , given that doesn't currently support Swift -> ARM64?

github.com/compiler-explorer/c

#swiftlang #arm64 #godbolt #compilerexplorer

Last updated 1 year ago

Gianluca Alloisio · @theGiallo
31 followers · 88 posts · Server mastodon.gamedev.place

So, I was writing some C, and I've learned that shis thing compiles and runs. Anyone here knew this, and why?
godbolt.org/z/vEasn57oo Also godbolt shows wiggly red lines without any error present.

#til #c #godbolt

Last updated 2 years ago

Marcs · @themarcsov
3 followers · 13 posts · Server hachyderm.io

Am I the only one who has their downloads folder filled with "Compiler Explorer C++ Editor #1 Code (N).cpp" files because they keep pressing Ctrl+S accidentally?

#godbolt

Last updated 2 years ago

Honey Sukesan (She/her) · @hsukesan
58 followers · 20 posts · Server techhub.social

Awesome C++ folks -
1. Does godbolt support gdb debugging?
2. I've a sample C++ code on , to run on ARM gcc compiler. Need a print to understand a behavior. Obviously, std::cout not working. Any other option? FYI @mattgodbolt

#godbolt #cpp #cplusplus #embedded #debug #print #dev #programming #programmer #arm

Last updated 2 years ago