AtCoder C++ compilator doubt

Правка en1, от 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?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский Um_nik 2020-09-21 20:07:26 8 Tiny change: 'hat compilator ignored ' -> 'hat compiler ignored '
en1 Английский Um_nik 2020-09-21 18:54:33 686 Initial revision (published)