Comment on Linux file write patterns: So you want to write to a file fastparentComments−asveikau12yYou are wrong. assert is a no-op when NDEBUG is defined. Some compilers will set that for you in an optimized build.Using an assert in place of real error checking or otherwise relying on its side effects is consequently a huge wtf in C.−awda12yMore like, assert() from assert.h is a huge wtf in C, because turning asserts off in optimized builds produces exactly these kinds of scenarios.
Comments
You are wrong. assert is a no-op when NDEBUG is defined. Some compilers will set that for you in an optimized build.
Using an assert in place of real error checking or otherwise relying on its side effects is consequently a huge wtf in C.
More like, assert() from assert.h is a huge wtf in C, because turning asserts off in optimized builds produces exactly these kinds of scenarios.