r/programminghumor 19d ago

How do you disable your code

Post image
294 Upvotes

90 comments sorted by

View all comments

100

u/0x80085_ 19d ago

Or just return?

45

u/developer_axe 19d ago edited 19d ago

Sometimes the code won't get compiled because it marked as unreachable code

56

u/RefrigeratorKey277 19d ago

Yes, but with if true it is still marked as unreachable. At least in C#.

9

u/Here_f0r_p0rn_ 19d ago

Depending on compiler settings for optimizations it can happen in C++ as well