2 ms·
The Linux kernel uses GCC (for a long time, it used a specific version of GCC), and it uses some flags to disable certain notions of UB, some of which were part
by tsimionescu 4y ago
The Linux kernel uses GCC (for a long time, it used a specific version of GCC), and it uses some flags to disable certain notions of UB, some of which were particularly added for Linux. Do these work for C++ code? Possibly, but who knows.
- fluoridation 4y agoSo they had the GCC people define the behavior based on a flag. Since undefined behavior means that all behaviors are permissible, including defined behavior, I see no reason why any C++ compiler couldn't do this.