compiler-explorer Questions

2

Solved

On Godbolt, opening /dev/null for writing fails when you use fopen but succeeds when you use open, and I have no idea why. #include <stdio.h> #include <stdlib.h> #include <string.h&g...
Kv asked 30/5, 2024 at 7:52

2

Solved

In order to ask questions about or demonstrate bugs/features with self-written modules in C++20, it would be great to be able to use Matt Godbolt's compiler explorer. Example: test.cpp (module te...
Hartz asked 19/3, 2020 at 15:26

1

Solved

From https://github.com/gcc-mirror/gcc/commit/3acb929cc0beb79e6f4005eb22ee88b45e1cbc1d commit, C++ standard header <stacktrace> exists things such as std::stacktrace_entry but is not declared...
Richy asked 19/1, 2022 at 4:25

3

Solved

I want to generate clean assembly like Compiler Explorer locally. Note that, I read How to remove “noise” from GCC/clang assembly output? before attempting this. The output using that method isn't ...
Andalusite asked 21/7, 2020 at 13:49

1

I am using https://godbolt.org/ to compile a simple C++ script but even the simplest int main() { std::cout << "Hello World!" << std::endl; } When I click Add new... -...
Chrisse asked 6/3, 2021 at 13:47

1

Solved

I am writing a function which requires an array to be created at runtime. The array will be of small size so I am not worried about unsafe code, however, I want to write 'proper' code. As suc...
Hairbrush asked 10/1, 2021 at 11:26

1

Solved

Lately I'm diving into optimizing my C++ code and as such started to play around with the compiler explorer. Since i am mainly developing on windows with Visual Studio i used the msvc compiler. At...
Flossie asked 18/5, 2020 at 21:22

2

Solved

I was looking at a random C++ example on Github ( https://github.com/Quuxplusone/coro/blob/master/examples/pythagorean_triples_generator.cpp ), and was surprised to see that it actually compiles ( ...
Colonize asked 28/12, 2019 at 22:6

1

Solved

I want to know how various compilers implement std::random_device, so I popped it into godbolt. Unfortunately, the only thing it says is std::random_device::operator()(): push rbp mov rbp, rsp ...
Billposter asked 21/5, 2019 at 19:45
1

© 2022 - 2025 — McMap. All rights reserved.