Compiler (3a) Flashcards
1
Q
What is in a realistic model of a compiler?
A
Preprocessor –> Compiler –> Assembler –> Linker
2
Q
How does CLion build a project?
A
Uses CMake as a build tool
Generates make files –> calls make
3
Q
Preprocessor
A
Role: Deletes Comments Expands Macros Replaces includes and constants Errors: Not using macros or defining constants Template instantiation
4
Q
Compiler
A
Role: Takes code and produces architecture dependent assembly code Errors: Type errors Syntax errors Grammer errors
5
Q
Assembler
A
Role:
Takes assembler code and changes it into machine code
Errors: N/A
6
Q
Linker
A
Role: Takes object code and libraries and links it together Creates final artifact Errors: Symbol missing Output file errors