The dreaded #ifdef

Eric | October 25, 2012

Today we conducted a little case study on OpenSSL to see how frequently people use #ifdef directives. This word cloud shows the relative distribution. There are currently¬†391 different flags being used in altogether 1874 #ifdef directives (not counting #ifndef etc.). The most prominent one is __cplusplus, occurring 214 times. I wonder how many people actually understand all their different side effects and combinations and how many combinations are actually being used in actual compiled products…

Frequency of occurrence of different #ifdef directives in OpenSSL as of Oct. 25th, 2012

P.S. Thanks to Kevin Falzon for helping out with this graphic!