Ticket #520 (closed bug: wontfix)

Opened 8 months ago

Last modified 7 months ago

mpicc -o test.c deletes test.c

Reported by: "Rajeev Thakur" <thakur@…> Owned by:
Priority: major Milestone:
Component: mpich2 Keywords:
Cc:

Description

The students at Utah discovered that if they mistakenly do "mpicc -o test.c"
instead of "mpicc -c test.c" the test.c file gets deleted :-(. On further
investigation, they found that "gcc -o test.c" does not delete the file, but
"gcc -o test.c -lm" does.

Not sure what we can do about it, but it is annoying to lose your source
file with a typo of "mpicc -o" instead of "mpicc -c".

Rajeev


% mpicc -o test.c    : test.c gets deleted
% gcc -o test.c      : No file gets deleted
% gcc -o test.c -lm  : test.c gets deleted

Attachments

Change History

Changed 8 months ago by Rajeev Thakur

  • id set to 520

This message has 0 attachment(s)

Changed 8 months ago by goodell

I'm inclined to say that this is simply user error coupled with surprising behavior in gcc and should not be fixed. Any time you specify the "-o" option the next argument really ought to be the output file. What does it use as the output file in the "gcc -o test.c" case, "a.out"?

On my laptop with Apple's version of gcc I get a sensible error about "no input files" when I try the "gcc -o test.c" case.

-Dave

Changed 7 months ago by thakur

  • status changed from new to closed
  • resolution set to wontfix

WARNING! You need to either login using OpenID here or enter your email address here before you can create or edit tickets. Otherwise the ticket will get treated as spam. More information on creating tickets can be found here.

Don't forget to add your email address to the cc list to make sure that you get updated of the ticket status.

Add/Change #520 (mpicc -o test.c deletes test.c)

Author



Change Properties
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.