Thursday, 4 June 2026

gcc on Windows

gcc on Windows can be used from WSL2. 

gcc --version

gives you the version you are using and the operating system.

gcc versions can be found here.

The C ABI

 The C ABI refers to the C Application Binary Interface.

This will differ depending on platform.

Platform specific ABI specifications include:

x64 ABI Conventions

ABI for Unix/Linux

Very important for C/C++ and assembly programmers.

C++ Value Categories

Every Win Joe knows an lvalue when they see one, but there are subtleties.

glvalue
prvalue
xvalue

Recap here (from cppreference.com).

Flags for cl.exe

cl /EHs 

enable C++ EH (no SEH exceptions)

SEH (Structured Exception Handling) is a Windows-specific mechanism for handling system-level exceptions e.g. access violations or hardware faults, using __try, __except and __finally. It is not part of the C++ standard.

cl /EHc

extern "C" defaults to nothrow

Explanation: extern "C" tells the compiler to use C linkage (C-style symbol names, no name mangling), and by virtue of defaulting to "C mode" we don't have exceptions (the C ABI has no concept of exceptions). 

So extern "C" functions therefore  implicitly move from:

extern "C" void foo();

to:

extern "C" void foo() noexcept;

noexcept was introduced in C++11.

Wednesday, 3 June 2026

The Return of C++

The Microsoft C/C++ Optimizing Compiler is making a comeback. 

Building an EXE with a decent UI is as easy as this two step process:

1. Opening "Developer Command Prompt" in Windows (hit windows key and type "Developer..")

2. cl /EHsc mySuperUI user32.lib gdi32.lib

Bye bye heavy frameworks which rely on Windows API functions anyway.

High Touch Vs Low Touch Human in the Loop

Some technologies and programming languages are winning on high-touch vs low-touch HITL systems.  This is largely due to the maturity of AI models - where the high quality training is happening - and probably lots of other factors - but it's a fast moving target.  Competitive advantage lies in the low touch.

AI Obsolesence

Interestingly, the race to build new AI features has made older versions of IDEs (Visual Studio case in point) obsolete at breakneck speed, the requirement to constantly upgrade is such that if you linger on even a slightly older version, the AI you relied on could be non-functional.