Questions Tagged [Gcc]

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.

38,934 questions
0 votes
2 answers
19 views

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(); ...
0 votes
0 answers
27 views

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 ...
2 votes
3 answers
34 views

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() ...
0 votes
0 answers
9 views

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 ...
0 votes
0 answers
3 views

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 ...
  • 3,619
2 votes
1 answer
17 views

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 ...
2 votes
1 answer
36 views

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 ...
0 votes
0 answers
9 views

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 ...
0 votes
0 answers
7 views

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:...
0 votes
0 answers
32 views

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, ...
0 votes
0 answers
23 views

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 ...
0 votes
0 answers
11 views

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 ...
0 votes
1 answer
40 views

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 ...
-1 votes
1 answer
48 views

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 ...
0 votes
0 answers
12 views

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 ...
  • 8,164

15 30 50 per page
1
2 3 4 5
…
2596
Robert Thorne
Author

Robert Thorne

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.