http://llvm.org/bugs/show_bug.cgi?id=21495

            Bug ID: 21495
           Summary: clang should prevent the .c files to get overwritten
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

>From gcc bug report; clang is 'vulnerable' too:
==================
Suggestion: prevent GCC from overwriting source code files when invoked as:

gcc source.c -o source.c

Background: I use command completion heavily. Very often while in coding mood I
do:

gcc myfile.c -o myf<TAB>

not to type "myfile", which is long. But after completion kicks in, I sometimes
forget to do <BACKSPACE><BACKSPACE>.

And .c file gets overwritten.

It'd be nice to have GCC catch this. And if you really want to do it, maybe run
GCC with: --yes-im-sure-i-want-to-overwrite-my-source-code switch.

==================

GCC links:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63462
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36312

This feature has been checked-in to Clang already. Would be nice to see Clang
fixed too.

Thanks,
Wojciech

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to