What are the performance benefits of using GAS over C, and why is C still...
Why do the main tools that currently exist continue to use C and multiply equally bad languages ​​from it? Why doesn't anyone want to reconsider the very concept of programming?I did quite a lot of...
View ArticleGCC 4.8.0 build size differ greatly on OS X and Ubuntu
Immediately after GCC 4.8.0 was released, I built it on OS X 10.8 with ISL and CLooG. The complete build was about 3.8 GB in size (release tar balls + untarred sources + all generated objects). I...
View ArticleMSVC FP library float erfcf(x) unexpectedly slow - 2x slower than double...
Can someone please verify that the slowness that I see with the MS library implementation of erfcf(x) is reproducible elsewhere. It might just be a benchmarking quirk. Also any suggestions for command...
View ArticlePack two binaries(executables) into one file
I have two binary(executable) files A and B. At runtime, A may call B depending on given parameters. Is it possible to pack the two binaries into one file? So that, when needed, A do not have to look...
View ArticleIntel Compiler vs GCC code generation differences
I'm learning about x64 programming and the differences between Intel C++ compiler and GCC and how they optimise the instructionsQuestions:What's the best way to tell Intel Compiler to dump the assembly...
View ArticleWhy is `std::find_if` implemented by loop unrolling but `std::for_each` isn't?
The gcc implementation of the standard library implements find_if using loop unrolling for random-access iterators, and other search functions (search, none_of, find, etc) are implemented by calling...
View Articlex86-64: Effective address' index is 0, unexpected offset
In an attempt to implement arrays in my programming language that compiles to assembly, I am struggling with expressions like array[0]. I have tested other indices like 1, 2, etc. and they work, but...
View ArticleCross compiler for embedded platform in Windows
I wish to build a compiler (GCC port) for Linux, so that the built GCC runs on Windows and creates executables for an embedded platform.Is the above possible?
View ArticleWhy do recompile attempts fail with Makefile?
When attempting to recompile an app that is currently running on Redhat 7.9 to new platform running AlmaLinux 8 the following error occurs:/usr/bin/ld: cannot find -lgfortrancollect2: error: ld...
View ArticleInstalled Raylib but it's not showing up in c drive
enter image description hereUsing "C:\msys64\mingw64\bin\gcc.exe" instead so I am unable to use Raylib header file. Installer said it was being installed in C:\raylib folder but after installation is...
View ArticleUse GCC to compile UWP DLL
I'm trying to compile a Godot 3.x application's GDNative module for UWP.Unfortunately, this fails and the result is always a native Win32 DLL that won't load in the constrained UWP environment.Is there...
View Articleg++ or gcc option to get warning message with warning id
By default gcc/g++ prints a warning message with the line number only. I am looking for the option by which g++ or gcc associates the build warning messages with the warning ids, so that the warning...
View ArticleWhy does GCC-Windows depend on cygwin?
I'm not a C++ developer, but I've always been interested in compilers, and I'm interested in tinkering with some of the GCC stuff (particularly LLVM).On Windows, GCC requires a POSIX-emulation layer...
View ArticleDoes GCC support C++23 std::print?
On CppCon 2022 was announced, that new official HelloWorld in C++ is now:#include <print>int main() { std::print("Hello world\n"); return 0;}Do you know, is std::print available in GCC ? Maybe it...
View Articlegcc optimization flag -O3 makes code slower than -O2
I find this topic Why is it faster to process a sorted array than an unsorted array? . And try to run this code. And I find strange behavior. If I compile this code with -O3 optimization flag it takes...
View ArticleGcc collect2: fatal error: cannot find 'ld'
I'm going through the tutorial on making an OS on http://wiki.osdev.org/Bare_Bones. When I try to link boot.o and kernel.o using this command: i686-elf-gcc -T linker.ld -o myos.bin -ffreestanding -O2...
View ArticleGCC won't work properly (a conflict with FreePascal)
I've installed MinGW and set the PATH, but gcc doesn't see the included files like stdio.h. I've typed "where gcc" and found out that FreePascal comes with gcc. Apparently my PC is using gcc that comes...
View Articlestrdup error on g++ with c++0x
I have some C++0x code. I was able to reproduce it below. The code below works fine without -std=c++0x however i need it for my real code.How do i include strdup in C++0x? with gcc 4.5.2 note i am...
View Article[[maybe_unused]] attribute not working
I am trying to ignore the unused parameter warning using the new c++17 attribute [[maybe_unused]], as below.int main([[maybe_unused]] int argc, char** argv){ //...}But I still get warning: unused...
View ArticleIs `extern` required to make an inline function definition externally linked?
GCC can compile and link the following .c files into an executable:main.c#include <stdio.h>#include "addsub.h"int main(void){ printf("%d %d\n", add(1, 2), sub(1, 2)); return 0;}addsub.c#include...
View Article