• Poul-Henning Kamp's avatar
    Arcanæ of the C-preprocessor (#436), brought to you by FlexeLint: · 5d3099e2
    Poul-Henning Kamp authored
    Don't:
    
    	MACRO(
    		a,
    	#if FOO
    		b,
    	#else
    		c,
    	#endif
    		d
    	)
    
    A function like macro was invoked whose arguments extended for
    multiple lines, which included preprocessor statements. This is
    almost certainly an error brought about by a missing right parenthesis.
    
    By the rules of Standard C the preprocessing directive is absorbed
    into the macro argument but then will not subsequently get executed.
    For this reason some compilers treat the apparent preprocessor
    directive as a directive. This is logical but not portable.
    
    It is therefore best to avoid this construct.
    5d3099e2
params.h 37.7 KB