Category "gcc"

Which GCC optimization flags affect binary size the most?

I am developing a C++ for ARM using GCC. I have ran into an issue where, I no optimizations are enabled, I am unable to create a binary (ELF) for my code becau

Are there any good mappings between GCC and MSVC warnings? E.g. -Wredundant-move on MSVC

This question is somewhat two fold, one being more general than the other. The specific question is; does MSVC have equivalent warnings to -Wredundant-move? Mor

Is there a way to check for compile flags that doesn't require the autoconf-archive package?

The AX_CHECK_COMPILE_FLAG macro is available in most distributions in the autoconf-archive package, but unfortunately when missing that package the error is imp

Cannot link gmp: library not found for -lgmp

I'm trying to install fastecdsa on macOS BigSur (M1 chip) by running (venv) $ pip3 install fastecdsa and even though I previously installed gmp: $ brew install

create shared library with main to call undefined function and provide function body in other project

I need to create a shared library using cmake, and I must call function run() in a library function. But the project which uses this library should provide the

Can g++ (gcc) 11 be used on Debian Bullseye?

Can g++ (gcc) 11.1 be used on Debian Bullseye? Debian 11 (bullseye) is soon to be released, and I am interested in a compiler with C++20 and modules support. De

In Assembler AT&T context: What does movl do in this specified line?

i have a some simple lines of code in C and wanted to disassemble it: #include <stdio.h> int main(){ int i=42; } After compiling it and starting gdb, i

Solaris 8's gcc isn't searching for header files on NetBSD

I have a gcc 2.95.1 binary installed on a Solaris 8 VM. For an experiment, I'm trying to get it working in a NetBSD environment. However, I can't run the compil

GCC -Wimplicit-fallthrough is not warning when I miss [[fallthrough]]

I am using GCC version 8.3 and have a switch statement: #include <iostream> enum class Type : char { Value1 = 'A', Value2, Value3, Value4

How gcc decide to use dynamics library when creating executable?

I am creating an executable with this: gcc elliptical.o -Llibs -lhfcal -o elliptical In my libs sub folder there are: libhfcal.a libhfcal.so files. My purpos

ELF file variable addresses of C structure in debug info

I have .elf file. I am trying to learn symbol address. I could find main variable addresses with many ways. I used pyelftools, nm.exe, objdump.exe, readelf.exe.

GCC, constant tables and .rodata

I have a strange problem with gcc and constants and .rodata Let's assume: typedef const struct { const char *a; } data_t; typedef const struct { const dat

Vector in C++ module causes useless Bad file data GCC output

TL;DR: GCC 11.2.0 (image f7ea55625e09) + C++20 + <vector>'s std::vector<anything> cause useless output. How to get out something I can work with? Co

configure: error: Fortran compiler cannot create executables

I'm trying to install Quantum ESPRESSO on my computer and have run into an issue when using the ./configure command in the unpacked directory. $ ./configure ch

LuaJIT and GCC: number of cores

BACKGROUND: I read several articles about performance benchmarks between LuaJIT and C-language. There were different conclusions, so I tried to compare the spee

Why is calling snprintf() so slow?

Our internal program is written in C and makes extensive use of snprintf() for many pieces, and I noticed that during debugging with perf record/report, it's sp

Compile and run assembly on macbook

I'm taking a course on computer structure and I'm lost. I was given the following file: Hello.s: #This is a simple "Hello World!" program .section .rodat

How to covert the address from KCOV output to filename:lineno using addr2line?

I want to use KCOV (code coverage for fuzzing) in the Linux kernel to record the coverage of certain system calls. I have enabled the corresponding kernel conf

Looking to use a library with example code for Open Quantum Safe

So I am trying to use following library: Open Quantum Safe I am using windows linux subsystem, so I followed the linux setup. I think I followed all the steps c

DCDO and FRAME PUSH instruction in Gnu GCC assembler syntax

I am importing arm asm assembly code to GNU assembler and not able to find the instruction for DCDO and FRAME PUSH that are used in keil(arm asm).