AtCoder C++ compilator doubt

Revision en1, by Um_nik, 2020-09-21 18:54:33

In yesterdays ACL1 I got WA on problem B. It turns out that compilator ignored the function call inside assert, the same code with function call not in assert works fine. Moreover, Merkurev explained that the reason for that is -DNDEBUG flag, and my submission works on GCC.

I don't understand computers, I just memorized some stuff that's enough for solving puzzles. I want to ask why the -DNDEBUG flag used in Clang, but not in GCC. rng_58?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Um_nik 2020-09-21 20:07:26 8 Tiny change: 'hat compilator ignored ' -> 'hat compiler ignored '
en1 English Um_nik 2020-09-21 18:54:33 686 Initial revision (published)