I have four source files. The main source file includes two other source files. The two other source files both include the fourth source file. In the fourth source file I have an include guard. Will the code from the fourth source file exist in two locations in the compiled code? Is this something that is compiler dependent? An example of this is shown in the code below.
Code:// filename: main.c #include "source1.c" #include "source2.c" int main() { return 0; }Code:// filename: source1.c #include "source3.c"
Code:// filename: source2.c #include "source3.c"
Code:// filename: source3.c #ifndef __SOURCE3__ #define __SOURCE3__ int myFunction() { return 1; } #endif