22 28 Jan 2016 19:27 by u/svipbo
Unused code is unreachable code and poses no risks.
This is talking about half-implemented features? I'm not even sure what their point is.
I'm thinking they meant "seldom used" code, such as exceptions for rarely encountered errors which become much more frequent if they get a little help from a cracker.
Doesn't unused/unreachable code pose a very very very small risk in the case of a buffer overflow or something similar?
A good compiler will remove unused code or at least warn you about it.
What are some comparably good or bad compilers that will/won't warn you?
Most compilers are good compilers these days, you just have to make sure you turn turn on the right options
gcc -Wunreachable-code
In non-compiled languages, a linter will do the same thing.
Thank you for sharing.
8 comments
6 u/Drenki 28 Jan 2016 21:06
Unused code is unreachable code and poses no risks.
This is talking about half-implemented features? I'm not even sure what their point is.
1 u/Macdaddy5000 28 Jan 2016 22:52
I'm thinking they meant "seldom used" code, such as exceptions for rarely encountered errors which become much more frequent if they get a little help from a cracker.
2 u/Novadale 29 Jan 2016 02:54
Doesn't unused/unreachable code pose a very very very small risk in the case of a buffer overflow or something similar?
1 u/Drenki 29 Jan 2016 03:05
A good compiler will remove unused code or at least warn you about it.
0 u/8bCvYq2vpg 29 Jan 2016 09:37
What are some comparably good or bad compilers that will/won't warn you?
1 u/Drenki 29 Jan 2016 13:21
Most compilers are good compilers these days, you just have to make sure you turn turn on the right options
In non-compiled languages, a linter will do the same thing.
1 u/SpottyMatt 28 Jan 2016 20:27
Thank you for sharing.