------- Additional Comments From roger at eyesopen dot com  2004-12-28 14:45 
-------
The consensus amongst GCC developers is that it would be incorrect/unsafe to
preserve the ".f" file in the shared system /tmp area.  The only reason that
the preprocessed .f file is being placed in /tmp, is to avoid overwriting the
user's source file foo.f in the current directory.  The appropriate solution,
as I've now documented in the GCC manual, is that when explicitly using "-x",
if you require a particular intermediate file from -save-temps, you need to
ensure that it's file name doesn't conflict with the input source name.

In your example, the input source file could be renamed foo.F (as you suggest),
or foo.for, or foo.fpp etc... or perhaps placed in a different subdirectory.

Although not a bug, this PR could potentially be considered an "enhancement
request", but the difficultly of generating a unique file name in the current
directory and informing the user of it's location, would be a technically
complex work-around for what would be considered by many a "user error".
The "-x" and "--language" command line options should be used with care and
are far less preferrable to using the "conventional" file extensions for the
various source file formats.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16118

Reply via email to