Week 5: Preprocessor Flashcards
What does the preprocesser make up one half of?
The compiler directive, the other half being the compiler.
In a nutshell, what does the preprocessor do?
Finds #include file and #define macros.
Include files are programatically placed where the #include tags are.
Defined macros are replaced throughout the program.
What are the 2 main benefits of macro pre-processing?
- Reduces overhead on the call stack, thus improves efficiency.
- Enables elimination of global variables.
What does the command line argument ggc -I do?
Specifies a search path for the compiler.
Define the difference between #include < > and #include “ “
< > makes the compiler search the standard path.
“ “ makes the compiler search the immediate directory of the program.
What is selective compilation?
Enables conditional statements to be executed in the context of pre-processing.
What are the 6 main selective compilation tags?
ifdef
ifndef,
else
elif
endif
undef -> Undefines a macro or symbol.
What are the 5 most useful predefined macros?
__FILE__
__LINE__
__DATE__
__STDC__
__TIME__