Skip to main content
0 votes
0 answers
28 views

My project defines a module ocr, imports std and includes headers from a few libraries, for example: module; #include <httplib.h> #include <tesseract/baseapi.h> #include <leptonica/...
1 vote
0 answers
38 views

Similar question: Assembly return address I want to write a function to print the return address of the current function. This is code that prints %ebp+4: void backtrace() { int ebp; asm ("movl %%...
0 votes
1 answer
48 views

While refactoring some legacy code I ran into some strange behaviour of CMake+GCC that I can not explain or correct. This is what I have: Debian Trixie with GCC 14.2.0 and CMake 3.31.6 A test project ...
180 votes
8 answers
396k views

I've been working on some C++ code that a friend has written and I get the following error that I have never seen before when compiling with gcc4.6: error: use of deleted function ‘GameFSM_<std::...
35 votes
3 answers
12k views

I'm working on a program written in C that I occasionally build with address sanitizer, basically to catch bugs. The program prints a banner in the logs when it starts up with info such as: who built ...
18 votes
2 answers
14k views

The following test program import std; int main() {} compiled with gcc-14 /usr/local/bin/g++ -g -std=c++23 -fconcepts -fmodules-ts -O3 -Wall -Wextra test400.cc --output test400 gives the following ...
9 votes
3 answers
32k views

I'm trying to compile my main.cpp, but I keep getting this error for two hours now. The issue here is to pass a function as a parameter but I think I'm doing something wrong. The compiler says it ...
7 votes
5 answers
3k views

This is the second time I make a big mistake, by creating a variable of type bool instead of a double. For example consider double f() { return true; } bool something() { return 0.0; } ...
5 votes
3 answers
222 views

I noticed there was a double precision divide after all log2 calls when using cygwin64 3.6.4 and using compiler options -O3 and -D_FILE_OFFSET_BITS=64 so I wrote a small program to illustrate it. ...
0 votes
1 answer
88 views

I'm trying to build mingw 13.0.0 with gcc 15.0.2 toolchain on Windows using another mingw 13.0.0 with gcc 15.0.2 build under busybox shell. As described in this tutorial, I first configured, built and ...
1 vote
0 answers
86 views

I have built GCC 16.0 trunk in order to test out the new C++26 reflection capabilities. I am developing using WSL (Ubuntu) and VSCode. As it stands, I have the following basic example in a simple ...
0 votes
0 answers
90 views

I follow How to use module `std` with gcc to generate "gcm.cache/std.gcm" on Windows using GCC 15.2.0 and ran g++ -std=c++23 -fmodules -fsearch-include-path -c bits/std.cc at "C:\bak\...
1 vote
0 answers
35 views

The code in question void _start() { const char msg[] = "Hello, World!\n"; long ret; __asm__ volatile ( "mov $1, %%rax\n" "mov $1, %%rdi\n" ...
0 votes
1 answer
214 views

I am writing a logging utility in C and want __FILE__ to print the full absolute path to the source file: /home/j/OSL/Separate.c But it still prints a relative path: ../Separate.c even though I am ...
3 votes
2 answers
1k views

With arm64, a literal for a nearby address can be loaded into a register with the adr instruction. According to the ARM-V8 Architecture Reference Manual the adr instruction: ADR <Xd>, <label&...

15 30 50 per page
1
2 3 4 5
2820