| ▲ | drysine 3 days ago |
| "On GCC, optimization flag O2 and O3 are not supported. You must compile the test project with -O1 or -O0." Sounds like they are patching objects in memory. Trompeloeil, for example, doesn't do that. |
|
| ▲ | thrtythreeforty 2 days ago | parent [-] |
| Yikes. "Broken with optimizations" means "broken" to me. Don't screw around with undefined behavior; either you had better avoid it, or your circumvention of the compiler had better be so airtight that it still works with optimizations. |
| |
| ▲ | OskarS 2 days ago | parent | next [-] | | I can’t remember ever seeing a bigger red flag on a C++ library than this. Even leaving aside the implications of UB (where I agree with you), does this mean I can’t run my test suite in release mode? What if it’s slow to run? What if there’s a bug that only happens in optimized builds? That’s gonna be a big no from me, dawg. | |
| ▲ | spookie 2 days ago | parent | prev [-] | | Those are not, in general terms, words to live by. In video games, of all things, it is usual to prevent certain code paths from being optimized for actual enforcement of security measures. Compilers are the ones taking optimizations a bit too far. |
|