<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - clang should prevent the .c files to get overwritten"
   href="http://llvm.org/bugs/show_bug.cgi?id=21495">21495</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang should prevent the .c files to get overwritten
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Frontend
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>wkoszek@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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:

<a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63462">https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63462</a>
<a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36312">https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36312</a>

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

Thanks,
Wojciech</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>