Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Browsing all 22219 articles
Browse latest View live
↧

Why does GCC take so much longer to build than llvm/clang?

This is a question about the process of building the compilers themselves. On my machine, compiling gcc (for C, C++, and objc) takes hours, while llvm + clang + clang++ is probably 10-20 minutes,...

View Article


"`GLIBCXX_3.4.32' not found" error at runtime. GCC 13.2.0

I am using Ubuntu 22.04.3 LTS in WSL.I successfully built and installed GCC 13.2.0 from source. This is how I configured it:../gcc/configure --host=x86_64-pc-linux-gnu --disable-multilib...

View Article


Qt 5.1.1 compiler setup on Ubuntu

I have a clean install of 64bit ubuntu, I downloaded Qt 5.1.1 for linux 64 bit from http://qt-project.org/downloads, ran the .run file, installed it and gcc which is included in that download, opened...

View Article

Getting an error "the input file is same as the output file

I am very new to C programming and I just installed mingw and started using vs code. I have installed all teh extension required in the VS code and have selected the default builder as gcc in the vs...

View Article

Output errors when using libmvec intrinsics for trigo functions manually...

Referencing this link, I tried to integrate the libmvec intrinsics into some existing C++ code.Naturally, this involved me changing the forward declaration toextern "C" __m128 _ZGVbN4v_cosf(const...

View Article


Template parameter pack expansion failure

Let us consider the following example source in C++:template <class begin, class... end>struct test { template <end... beg_vals, begin end_val> static consteval void make() { }};int main()...

View Article

What are GCC and Clang options to generate Intel DL Boost bfloat16 instructions?

For this code:#include <stdfloat>std::bfloat16_t foo(std::float32_t f){ return f;}GCC generates this code:foo(_Float32): sub rsp, 8 call __truncsfbf2 add rsp, 8 retHere we see call __truncsfbf2,...

View Article

C++ Type traits dependent upon declaration ordering and varying compiler...

I found a strange behavior with a custom type trait I was writing and further found that different compilers are having different behavior with the trait. The goal is simple, I want to detect if a...

View Article


What does the filename "gmon.out" stand for?

The GNU compiler toolset has a profiler "gprof" for performance analysis of C++ programs. With the -pg switch, the gcc compiler will make executables that write a data file, "gmon.out", on each run....

View Article


Difficulties with gcc inline assembler: asm("PUSH EAX;")? [duplicate]

If tried to do a asm("push eax;"), but it did not work.asm ("push ax;") and asm("push rax;") work fine.Any suggestions?

View Article

What does __fortify_function do under GCC?

I am working on a program I wrote a while ago and have come across something I can't figure out why I did it.__fortify_function void DoLog(const char* format,...)As suggested by the name the function...

View Article

Strange array initialize expression?

What is the meaning of following Code? Code is from the regression test suite of GCC.static char * name[] = { [0x80000000] = "bar"};

View Article

How to tell if my program needs libgcc_s.so.1?

ContextI have a bunch of C/C++ code on Linux that I need to build on a Linux host machine and run inside a custom container solution (clean Linux). In order to be able to run the program inside my...

View Article


Why do std::vector v{1, 2, 3} and std::vector v = {1, 2, 3} call different...

Question- see Compiler ExplorerIf I create an std::vector<int> and initialize it two ways, both call the std::initializer_list constructor.std::vector<int> v1{1, 2, 3}; // Calls...

View Article

cases for gcc to ignore register declaration?

K&R says compilers are free to ignore the advice (register declaration).In what cases, gcc would ignore if I define register int x = 4;?

View Article


how to generate a map of instructions when compiling?

when compiling a program with gcc or any other compiler, can I somehow make the compiler generate a map of instructions in memory ??something like:0000: First Instruction0001: Second Instruction1000:...

View Article

import std module with gcc-15

As mention in this gcc patches, the std module is built in gcc development branch. I build from source and try to use it in cmake project but it show std module not found.This is my minimal...

View Article


Compilers - stop in the middle of the process

I just started to learn about compilers, and I wondered - is there a way to tell GCC (or any other compiler) to stop in the middle of the process, and give me a file with the current state (for example...

View Article

Would compiler put jump table at the end of function?

For example, this is an assembly with jump tablemovl $5, -4(%ebp)cmpl $10, -4(%ebp)ja L13movl -4(%ebp), %eaxsall $2, %eaxmovl L14(%eax), %eaxjmp *%eax.section .rdata,"dr".align 4L14:.long L13.long...

View Article

Cannot configure project with avr-g++/gcc - "unrecognized option '--out-implib'"

This is my configure command:cmake -B../build_atmega328 -S. -G Ninja -D CMAKE_C_COMPILER=C:\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\bin\avr-gcc.exe -D...

View Article
Browsing all 22219 articles
Browse latest View live