Ask Question

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.

38,934 questions

0votes2answers19views

When GCC does not provide __cpp_lib_uncaught_exceptions feature?

Following piece of code does not work right on Alpine Linux: #ifndef __cpp_lib_uncaught_exceptions namespace std { int uncaught_exceptions() noexcept { return std::uncaught_exception(); ... user avatar John Tracid

  • 3,756
0votes0answers27views

Large header file vs compilation time [closed]

Im working on a large project, my issue is as follows: I have a large (200k lines of code) header file which is auto generated code, it contains about 3k classes (all of them are small classes). And ... user avatar Mohammed Kiwan

  • 11
2votes3answers34views

using C copy a 1D char array into 2D char array

I am trying to copy a 1D array of Strings into a 2D array of strings in C. I was able to achieve this with integer enter image description here //Here is what I tried for integers. int main() ... user avatar Moodkiller

  • 31
0votes0answers9views

rpc/rpc.h file not found on windows

I am working on sunrpc library developed by Sun Microsystems on windows. I have downloaded GnuWin32 sunrpc4.0 on windows 10. I am running rpcgen -a -C -Y "C:/MinGW/bin" add.x command and I ... user avatar shravani

  • 1
0votes0answers3views

How to use GCC PGO with source code in different folder?

I've compiled PGO-instrumented build from A/src and collected the profile. Now I want to apply this profile when building from B/src. Is this possible? GCC complains about the lack of profile since ... user avatar Dan M.

  • 3,619
2votes1answer17views

bad defsym; format is --defsym name=value

Explanation: I've created an STM32 project and aim to get a platform-independent build and output file like .hex, .bin, and .elf. For this, I created the project under the CMake build system. CMake ... user avatar codeluyor

  • 25
2votes1answer36views

What is unlocked_stdio in C?

So, I was looking for random linux manual pages, when I encountered this weird one, you can see it by executing "man unlocked_stdio", or you can view it in your browser by going to this page ... user avatar dfmaaa1

  • 45
0votes0answers9views

RISCV inline assembly compilation

To start with optimizing my code I have to start with adding assembly code into my C which is crosscompiled with gcc riscv toolchain, to start with I trying to implement simple riscv inline as follows ... user avatar jasan singh chugh

  • 1
0votes0answers7views

Installed gcc 12.1.0 in /usr/local/bin and now ubuntu cannot find and point to it

I have tried all the solutions of similar questions and none works. I have installed gcc in /usr/local/bin and this my PATH variable echo $PATH /usr/local/gcc-12.1.0/bin:/usr/local/sbin:/usr/local/bin:... user avatar skghoolala

  • 21
0votes0answers32views

Reading an update across threads

In my application, I have a block of shared memory, which one thread periodically writes to, and another thread periodically gets (and then sets to 0) Thread 1: @onevent: __atomic_store(addr, val, ... user avatar Mihir Shah

  • 17
0votes0answers23views

charconv header not found gcc 12

I'm running Debian 9 on WSL 2 and I'm trying to compile C++ code that uses the <charconv> header. I have the line set(CMAKE_CXX_STANDARD 17) in my Cmake file so it's definitely using C++ 17 but ... user avatar ishaangupte

  • 197
0votes0answers11views

Replacement for Omagic flag?

When switching from using GCC to CLANG, for some reason including the -N/--omagic flag increases my .elf executable size by ~1000x, as the physical address of an init_array section that is otherwise ... user avatar ijustdontgetit

  • 21
0votes1answer40views

memcpy for volatile arrays in gcc C on x86?

I am using the C volatile keyword in combination with x86 memory ordering guarantees (writes are ordered with writes, and reads are ordered with reads) to implement a barrier-free message queue. Does ... user avatar personal_cloud

  • 3,524
-1votes1answer48views

cannot open source file stdio.h C in vscode

I've been trying to learn C recently. When I execute the following code in visual studio code: #include <stdio.h> int main() { // variable declaration int a, b, c; // user ... user avatar icyfirejosh4352

  • 3
0votes0answers12views

ARM crashing upon returning from a function [closed]

The device consists of an Cortex M4 main processor and an Cortex M0+ co-processor running the network stack. I've been trying to influence the bluetooth advertisement beacon behavior - when are they ... user avatar Vorac

  • 8,164

153050per page

1 2 3 4 52596