Language Switch and No Input File Extension
Go Up to Specifying the Source File
If gpre encounters a language switch, but the specified input file has no extension, it does the following:
- It looks for the input file without an extension. If
gprefinds the file, it processes it and generates an output file with the appropriate extension. Ifgpredoes not find the input file, it looks for the file with the extension that corresponds to the indicated language. If it finds such a file, it generates an output file with the appropriate extension. - If
gprecannot find either the named file or the named file with the appropriate extension, it returns the following error:gpre: can’t open filename or filename.extension
<filename> is the file specified in the
gprecommand. <extension> is the language-specific file extension for the specified program.
An Example:
Suppose the following command is issued:
gpre -c census
gpre performs the following sequence of actions:
- It looks for a file called
censuswithout an extension. If it finds the file, it processes it and generatescensus.c. - If it cannot find
census, it looks for a file calledcensus.e. If it findscensus.e, it processes the file and generatescensus.c. - If it cannot find
censusorcensus.e, it returns this error:
gpre: can’t open census or census.e