You must log in to comment.

in reply to @ThePhD's post:

I'd purged my memories forgotten about the whole "signed integer overflow is UB" thing from when I first learned about it in one of my uni courses. it's... truly A Choice.

the work you're doing with C seems from the outside like an absolute pain, but incredibly valuable nonetheless. thanks for what you do <3

C++ was the first language that I spent enough time with to actually learn the basics of programming, and it feels like every time I look at it again it's on fire in a new and interesting way (or at least one that I hadn't noticed before).

There might be another choice: people who want a version of C/C++ with all behavior defined could pool some money to start an organization that would maintain its own fork of Clang.

There's probably enough users who (1) want this (even if it results in a reasonable performance hit) and (2) have access to the necessary funds.

This organization (if it were to be established) could potentially also coördinate efforts to change the standards.

Anyway, this article was a spicy meatball, and a joy to read!

Just finished listening to a talk where a game engine dev made a very interesting point too: "Hardware defined behavior" would even be preferred over "undefined behavior" because then you have a guarantee a compiler can't kill your optimization potential <_<

I truly regret to inform you that, ultimately, somebody would just define a "hardware" layer that would take whatever expectations that person has for Hardware defined behavior and just punch everyone in the face with it. Not even out of malice, but out of sheer indifference to the idea that they need to write a whole new model to optimize against.