After preprocessing it can happen that some source files in our project are completely empty. Some compilers, such as gcc, accept this input and produce an essentially empty object file. This is the behavior we want. However, ifort (9.0) gives an error message (see below). Is there any way to make ifort accept the empty input file, which would allow us to continue using our very simple build system? An alternative is to include stub subroutines in the files, but that is not very clean.
VU University Amsterdam
Error message from trying to compile an empty file:
ifort -c empty.F
fortcom: Error: empty.F, line 3: Syntax error, found END-OF-FILE when expecting one of: ; BLOCK BLOCKDATA PROGRAM TYPE COMPLEX BYTE CHARACTER ...
compilation aborted for empty.F (code 1)