Skip to main content

Questions tagged [gcc]

GCC is the GNU Compiler Collection. It's the de facto standard compiler for C, C++, Go, Fortran, and Ada on Linux and supports many other languages and platforms as well.

gcc
-2 votes
0 answers
53 views

GCC not compiling any source codes [closed]

I'm using Clion and GCC on macOS Sequoia. And, when I tried to compile a source code, it keeps making this compile error. GCC version : gcc (Homebrew GCC 14.1.0_1) 14.1.0 Apple Clang version : Apple ...
bookwormkkm's user avatar
0 votes
0 answers
12 views

Issue compilation mingw32-g++ error: CreateProcess: No such file or directory

^~~~~~~ COLLECT_GCC_OPTIONS='-save-temps' '-v' '-std=c++11' '-Wall' '-march=i386' '-I' 'C:\nat\IP_TRAIN\Components\piscontrol\inc' '-I' 'C:\Qt\4.7.3\include\QtCore' '-I' 'C:\nat\IP_TRAIN\Tools\xbinder\...
Osman Kamil's user avatar
0 votes
2 answers
121 views

Is there any way to explicitly tell compiler to stop optimization

Linux, C, GCC, ARM (Allwinner H3). Is it possible to get the following equivalent functionality (pseudocode): #pragma optimizations-stop #pragma registers-flush a=10; while(*b != 0) c++; if(a == 0) { ...
Anonymous's user avatar
  • 619
0 votes
1 answer
60 views

Building GCC Cross-Compiler for ARM VxWorks

I am trying to build a cross-compiler from a x86-64 Linux host (Ubuntu-22.04 in WSL, with GCC 11) to arm-wrs-vxworks, and I'm having some serious trouble doing so. I have very limited experience with ...
StardustGogeta's user avatar
-1 votes
1 answer
44 views

How do I change my gcc compiler and debugger in VSCode?

I need to use another compiler (gcc, gdb, g++) that I installed on my Win 11 box on VSCode. How do I do that?
Diego's user avatar
  • 356
1 vote
0 answers
69 views

Can fopen return stdout and require it to be closed?

Some old C code I wrote implemented an output file option, which I reduced to a minimal example: #define _XOPEN_SOURCE #include <stdio.h> #include <string.h> static void output(const char ...
Josh Brobst's user avatar
  • 2,015
0 votes
0 answers
33 views

How can I declare a pointer to a constant struct literal that uses a flexible array in C if possible? [duplicate]

So I wanted to store some constant text and data for parts of a level in a game in a struct, then put pointers for all those structs in a struct for each level, and pointers for all the level structs ...
nathanael grix's user avatar
0 votes
0 answers
42 views

Meaning of rust-gdb.exe, rust-gdbgui.exe with respect to gnu gdb?

I am working on Rust and I am debugging with gdb (MinGW64, I am working on msw). I saw in the .cargo folder (.cargo/bin) many executables: Directory of C:\Users\me\.cargo\bin 24/06/2024 19:37 &...
mgrs_'s user avatar
  • 11
0 votes
0 answers
16 views

Using GCC on Apple M2 Max Laptop

I can't use GCC because clang interferes with it. I used brew install gcc, and it downloaded correctly but I can't use it because clang overrides it. I added the path into my /.bash_profile so when I ...
sam's user avatar
  • 1
-1 votes
0 answers
46 views

visual studio code dosen't recognize ''./a.out''? [duplicate]

I wrote a c++ code on visual studio code. Later I tried to run it on terminal. When I wrote ./a.out, it didn't recognize. It shows ./a.out : The term './a.out' is not recognized as the name of a ...
taz's user avatar
  • 1
4 votes
2 answers
88 views

C++ ambiguous member vs non-member function template resolution in GCC 14 but not in prior GCC versions

The following code compiles fine with GCC 13 and earlier, but GCC 14.1 produces an "ambiguous overload" error. Is it a compiler or code problem, and, more pragmatically, can I make the ...
akryukov's user avatar
-1 votes
1 answer
35 views

how to debug "*** buffer overflow detected ***: program_name terminated" along with _FORTIFY_SOURCE=2

My program crashes with the message "*** buffer overflow detected ***: program_name terminated", and I suspect it may be related to the compiler option "_FORTIFY_SOURCE=2" that I ...
user180574's user avatar
  • 5,960
0 votes
0 answers
61 views

tsan thread sanitizer, why only a single bug is reported

I wrote a simple test prog which contains two data races. But tsan only reports the first one what ever I try to modify. Is tsan always only reporting a single bug? Maybe tsan can't see some bugs ...
Klaus's user avatar
  • 25.2k
0 votes
0 answers
17 views

gdb and thread sanitizer gcc, how to stop on warning/error

I tried to run a program compiled with thread sanitizer under gdb control. I simply want to stop if an warning/error occurs. From How to add breakpoint when thread sanitizer reports data-race? I found ...
Klaus's user avatar
  • 25.2k
1 vote
1 answer
57 views

RVV type for a class member in C++

I would like to use RISC-V vector extension in my C++ application. I noticed that it is not possible to use RVV types (e.g., "vuint32m1_t") for class members. Compiling with gcc (v13.2.0), I ...
rrpp1045's user avatar

15 30 50 per page
1
2 3 4 5
2785