<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/55489>55489</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            clang flase-positive implicit declaration
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          JAicewizard
      </td>
    </tr>
</table>

<pre>
    I am fairly certain that I have found a false positive in clang, using the latest from the arch Linux repos.

`clang --version`:
```
clang version 13.0.1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /sbin
```

Example program:
```
#include <stdio.h>

int main() {
        char password[256];
        gets(password);
}
```

clang output when compiling file above:
```
main.c:5:2: warning: implicit declaration of function 'gets' is invalid in C99 [-Wimplicit-function-declaration]
        gets(password);
        ^
1 warning generated.
/sbin/ld: /tmp/main-88b226.o: in function `main':
main.c:(.text+0x22): warning: the `gets' function is dangerous and should not be used.
```

This is not an implicit declaration of `gets`, as I imported `stdio.h` and `gets` is defined in this header per the standard. 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx9VE1v4yAQ_TXkgmw5-CPxwYembaSu9lhpjytsBpsVgQhwku6v34HETVdqG9kEez54896MeyveuhfKD1Ry5fQbHcAFrgwNEw_0hU78BFTa2QjK0UV7oEfrVVD4Gr0Gzc1I2COdvTIjBgHVPIAPVDp7SM_cDRP9qcx8oQ4wNifFEykebmtTpBQ0y07gvLIG35Dybr1d6fHqefOj6zIv8vXV8srdCAHj6GXb_G6q7DhkOh6ZjWa-uUwOuKAHK0BHx1jF5Wp6MT5wrUE8KRdNhO19r8ynGK7r84UfjhqpcHZ0_PAVYMJKZQY9C6CkfPRBKJtPpHz-mEqZQA9IOGFbwlpKNrvF2g4Td_TIvT9bJ0i9Y3VD6idS3j2waI-B7z6svVs3T98UcKXSzuE4B3qeAJW0h6PSUUSpsDLe2xN8VVfEmw9orfFmkbIzdwZj41YhM2pQgQrAUxwPUSwrqZzNkPaEba64N1R5bKIT10rEZnpssf56l_1aUmRLTPYhV6QgoaC33zckLC6kvnG-XpBilAFMCGLpx5vobK_FrQnC4YhrLDbbbnvGmtymAs2HWpriKt7mnat3chBTHuASCNsVF8YSrv-YitOBCRYy3pMiKwLlAWdnTzlOnp_srAU1NtAecNTuoD_T9nWKtPrkzs2XeiwnYzDOL_c47OhqHVISbUu3NkWCcPdO8EAqA0m0EE-bcLQAexXvWBSOkxHciZyuRFeKtmz5Kqigobv2ndTcQ3b_jnyCcDU73U0hHH1ico_XqMI09zk2ahRJn5a_DKfwDwzI8155PwOSua_ratuupq5vC9kwJgdetdVQQb9u642smgIFlbIpV5r3oH2HbUcYM3CmKQXusc1WqmMFY0W9rtl6XVZVPshqLcsSSimZbERPqgJQb51HHLl148p1CVI_jx6NWvng70bsUDUagHQc5udzmKzrfjyoAc7qLzK2Ssd3Cf4_pl24XA">