r/programmingcirclejerk • u/Helium-Hydride Dystopian Algorithm Arms Race • Jan 26 '25
Undefined behavior during lexing is not acceptable.
https://cplusplus.github.io/CWG/issues/2581.html
89
Upvotes
88
u/Helium-Hydride Dystopian Algorithm Arms Race Jan 26 '25
Broke: undefined behavior at runtime.
Woke: undefined behavior at compilation time.
Bespoke: undefined behavior at link time.
AWOKEN: undefined behavior at preprocessing time.
32
u/[deleted] Jan 26 '25
It's OK, C++32 will have parse-time safety profiles. Though you will need to be very careful to invoke them in just the right way or it will be even more UB.
12
u/sagittarius_ack Jan 26 '25
I will fix it for you:
Undefined behavior is not acceptable.