Generally speaking, the use of conditional compilation increases complexity which makes it harder to achieve security and other desirable qualities. A part of this complexity is essential if you want to be able to introduce a certain amount of variability. The other part is accidental ans relates to the technical details of conditional compilation and available tool support.
The use of annotation-based variability mechanisms in which the code is annotated with variability information such as conditional compilation affects understandability and testability:
Reduced Understandability
How do you know the context of a certain part of the code so you can understand it? How does the compiler know, so you can at least be sure there are no type errors etc.? The problem is that code related to configurable feature is scatteref across the code base. A certain discipline is required to cope with this problem as mentioned in another answer, but does not eliminate the underlying problem.
Reduced Testability
How do you know the software works for all combinations of options?
The answer to these questions is that it is not possible for you, the compiler or mainstream testing tools to sufficiently reason about all possible variants before actually building them. The problem is you cannot build all combinations because of the resulting combinatorial explosion. There are concepts for variability-aware analyses but they are not widely adopted, yet.
While as a human you can to a certain extend try to consider a limited amount of variability when understanding code and there exist certain technical concepts to deal with the problem, it is still an #ifdef hell out there in many projects.
As you already mentioned there is no widely available tool support that helps you deal with conditional compilation.
The good news is that people in research are working on solving these problems and investigating alternative variability mechanisms. For instance composition-based variability mechanisms help with local reasoning by modularizing features ( think AOP ).
There are also tools that help avoid errors when using annotation-based mechanisms by checking annotations against an explicit variability model for valid combinations.
To deal with testing in the presence of variability im general, there are several sampling approached that help select representative combinations based on different criteria.
There are also variability-aware analysis tools, but those still lack mature implementations and industry acceptance. For instance, many standards require product-bases analysis e.g. for safety-critical domains.
Currently, there is a good bunch of concepts that may find their way into mature tools one day.