Qualification of the C/C++ Standard Libraries for Safety-critical Applications
youtube.com
youtube.com
It is all a matter of trust.
My opinion: I would be a fool to trust what comes out of gcc or clang. Better write assembly directly and remove the compiler trust issue for good.
You could make the argument that eg space software or nuclear etc... would be a candidate.
But since assembly is so difficult to read this alone could introduce many bugs as soon as you'd eg have to maintain ~3 months old code since you will forget the details by then even if you are the one who wrote so you'd lose the "context" since in assembly it's much easier to lose the "context" of the task due to its less-intuitive nature than a high level programming language.
Since even space etc... software today I assume is way too large to write in assembly? Or am I wrong? Eg how large is the main "thruster" code for SpaceX? But all of that has to interface with many sensors, redundancies, backups, telemetry...
Because to be independent from those pieces of software which are compilers and from languages with absurd and grotesque syntax complexity (c++ and similar) is so much a win in the long run: after decades of coding I realized that to endure not the compiler (open source or not) vendor lock-in by size and complexity or the never ending planned obsolescence of computer language syntaxes (from ISO or compiler specific extensions), I am ready to code assembly and that _EVEN_ without comments (but don't worry, I write them, because they are actually sort of part of the "code").
And for always-trash-rdy/quick-and-dirty pieces of software, which should not be ignored and minored (for instance yt-dlp), assembly written of very high level language interpreters should handle them: python/lua/ruby/javascript/haskell/(and the bazillions of others). I would start with a basic POSIX command shell though.
https://learn.adacore.com/
Ada is a state-of-the art programming language that development
teams worldwide are using for critical software: from
microkernels and small-footprint, real-time embedded systems to
large-scale enterprise applications, and everything in between.
SpaceX might use Ada.