Skip to main content
The 2024 Developer Survey results are live! See the results

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.

8 votes
2 answers
174 views

Why does GCC fail to reduce a loop that increments two locations of the same buffer?

Here is a bounded loop that increments two locations of the same buffer. unsigned int getid(); void foo(unsigned int *counter, unsigned int n) { unsigned int A = getid(); unsigned int ...
0 votes
0 answers
20 views

Libsanitizer Error When Building GCC Cross-Compiler

I'm encountering compilation issues while building a GCC cross-compiler for RISC-V. Here is the last part of the GCC make command output if it might be helpful: ../../../../../src/gcc-14.1.0/...
2 votes
2 answers
2k views

'dlltool' equivalent in Linux

In Windows, an executable called dlltool, given with GCC, is used to generate import library for a DLL file which is used for linking DLL files. For example, libmylibrary.a for mylibrary.dll. But in ...
0 votes
1 answer
56 views

Passing `volatile` buffers to library functions which do not take `volatile`

I have a multi-processor system with a "shared" memory region used for communication. In some cases one of the processors needs to process some considerably large data in the shared memory ...
0 votes
1 answer
26 views

When cross-compiling for an ARM embedded target using GCC, is it reasonable to expect the Windows and Linux versions to produce identical output?

I have a build for an ARM embedded target that is developed using eclipse and GCC toolchain release 12.2-rel1. I have set up a build in TeamCity that runs in a Linux-based Docker container, also using ...
0 votes
0 answers
21 views

Problems compiling CMSIS-RTOS library in ARM A7 firmware

I'm writing a firmware for STM32MP135 A7 ARM micro. I'd like to include CMSIS-RTOS2 libraries and compile a simple basic program (to blink 2 LEDS in 2 different threads) by gcc cross toolchain and ...
2 votes
2 answers
91 views

C++ Compile-Time Class With std::vector Member Variable and Use It's Data at Run-Time [duplicate]

I am trying to make a writer class, which would be used to turn data into a binary stream, at compile-time using a std::vector, and then converting it to std::array to be used at runtime. eg: #include ...
0 votes
1 answer
31 views

Tensorflow 2.17.0 build failed with bazel linux

I download the source code of tensorflow-2.17.0 from github, then i run 'configure' and build with bazel-6.5.0 successfully, > bazel build //tensorflow/core:tensorflow then i create a folder 'test'...
3 votes
4 answers
20k views

netinet/sctp.h: No such file or directory

I'm unable to include in any of my files. It always fails during compilation. I got the lksctp-tools package installed. I run gcc -Wall -lsctp -o client admin.c deserializer.c input_parser.c ...
4 votes
1 answer
8k views

Fake-Positive Bit-defender problem Gen:Variant.Tedy.304469

#include <stdio.h> #include <stdlib.h> int compteAppels() { printf("hey"); return 0; } int main() { int i, nbAppel; nbAppel = rand(); for (i = 0; i < nbAppel; ...
1 vote
0 answers
53 views

No compile time errors or warnings are being shown on my terminal window in vs code

I am using c language and I am working on windows using gcc compiler..I have also installed extensions like code runner and c\c++ Microsoft one too. For example, If I put an assignment operator in the ...
28 votes
10 answers
14k views

What's your favorite g++ option? [closed]

I am a newbie in C++ programming. When compiling I never use any option. This is my day to day command: g++ MyCode.cc -o MyCode For safety practice what's the best option to use?
4 votes
7 answers
8k views

How to compile a C program?

I haven't done C in a long time. I'd like to compile this program, but I have no idea how to proceed. It seems like the makefile refers to GCC a lot and I've never used GCC. I just want an ...
0 votes
1 answer
38 views

Building binutils in cygwin error on 'make' command

I use the cygwin to build the binutils for my platform. I followed the GCC-Cross-Compiler article and stack on 'make' command. The command i used: export PREFIX="$HOME/opt/cross" ../...
86 votes
7 answers
83k views

What is the default C -std standard version for the current GCC (especially on Ubuntu)?

When I ask to see the current version of cc I get this. $ cc --version cc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2 Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see the source ...

15 30 50 per page
1
2 3 4 5
2787