Skip to main content
0 votes
1 answer
62 views

I disassembled a 7,838,304-Byte portion of /usr/lib/x86_64-linux-gnu/dri/i965_dri.so using Capstone as shown below: #include <stdio.h> #include <string.h> #include <stdint.h> #...
TheAhmad's user avatar
  • 940
1 vote
0 answers
59 views

I need to install RStan and I want to make sure that it's as efficient as possible. I'm using gcc. I'm reading this guide from 2022. Luckily, the Stan developers built an option called STAN_CPP_OPTIMS ...
AnthonyC's user avatar
  • 705
11 votes
1 answer
641 views

Consider the following simplified code: template <class T> class Foo { T t; const T* t_ptr; public: constexpr Foo(T t): t(t), t_ptr(&this->t) {} constexpr Foo(const Foo&...
eyelash's user avatar
  • 4,126
1 vote
0 answers
98 views

I am making my own UNIX like OS called Connor's UNIX and I am implementing kernel and userspace separation and I have been all day and this is as far as I can get it to work and if you need any more ...
Connor Thomson's user avatar
-1 votes
0 answers
67 views

I'm following the barebones guide on OSDev Wiki and I'm trying to compile my kernel.c file with i686-elf-gcc -ffreestanding -O2 -m32 -c kernel.c -o kernel.o but I constantly get the following ...
James Cho's user avatar
3 votes
2 answers
108 views

I have an application where I need to generate date and time based on the locale using the strftime function provided by C's time.h: #include <stdio.h> #include <time.h> #include <...
Micro Soft's user avatar
2 votes
0 answers
46 views

Regardless of --build or --target, when configure points out the I'm trying to compile GNU pth in 32-bits form under Linux. Toolchain used: Ubuntu 24.04.2 (VM) gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13....
Marc St-Jacques's user avatar
Advice
0 votes
4 replies
191 views

Title: Why does GCC transform a >= 4 into a > 3 at -O0? JG seems more complex than JGE I'm analyzing a simple C code on godbolt and found GCC's code generation puzzling: long a; a = a >= 4; ...
Alexandr's user avatar
Tooling
0 votes
0 replies
45 views

A friend of mine has an application in C he has been helping to maintain, which he has been building for Linux, but he asked me to help build Windows binaries. The project has a Makefile.win32, so it ...
CalicoSkies's user avatar
Advice
0 votes
1 replies
42 views

Disclaimer: I'm expecting that the answer to this question will be that it can't be done, but I'm asking as a just in case. I am working on a JIT'd language with the compiler and runtime implemented ...
idka's user avatar
  • 131
Tooling
0 votes
3 replies
98 views

Which IDE and tools are best suited for gcc C development? I currently use vscode and the tried using the ms-vscode.cpptools extension which "supports" gcc C. But extensions like nested ...
mcmah309's user avatar
Advice
2 votes
6 replies
121 views

Does anyone know if there is, in c++, any way to determine at runtime the cpu characteristics of the machine that compiled the code? For example, in gcc (which I'm using) the preprocessor variable ...
user3195869's user avatar
Advice
0 votes
6 replies
80 views

I have a AVR GCC toolchain compiled to work on aarch64-linux-gnu devices (ARM64) and it produced twice larger file (around 35Kb) than almost identical command-line on desktop (mac silicon, around 20Kb)...
4ntoine's user avatar
  • 20.6k
3 votes
1 answer
120 views

I stumbled upon different behavior of std::filesystem::path::parent_path() when a path contains leading slashes. Clang says that the parent of ///a is /// (which is what I would expect), but GCC says ...
danpla's user avatar
  • 705
1 vote
2 answers
149 views

Take the below piece of code, that simply Trims a string, removing whitespace characters from either end: const std::string TrimString(const std::string& s) { const auto iter = std::find_if(s....
The Welder's user avatar
  • 1,099

15 30 50 per page
1
2 3 4 5
2819