<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=http://email.email.llvm.org/c/eJylVE1v2zAM_TXyRUhgy0nsHHxo0wYY2gEDBqxnyaJtbbIU6CNB--tH2cnaBV1RYIEsWxT1-MRHRlj53Oys8UqCI-UNJaweQjh4_CZsj6O3Ulgdltb1uHrB56HkT08PNV8RtiX5HclvzvMmP49pGRG0NyBph5joSkl1O-9Q_DkI0ZkU7uKHLisc201V5_WSlGdnUt29Cz_P35VpgYYB6JHrCFR5amOgtqOOmx4I202bAgZ-VDa65BCNhE4lZtxI-vj44ys9Ka2pPQQ1qpcZzoGPOtBgZ_cEdBpUOySAg7OCC_1MjQ1o5WE6IeEI2h7A0RM3AeTyLc-dRjpUWvCGsApPcbw8nnKwpF9waaOWs3GwJwRyKaDqJuDWGjR4ZQ094QGqxoNWrQpJok-kv_8g_R8nfJ7LncfEtUDKe4y4wadgqVISW2X69Hlh9JYqSvBWibM-nbMjil5JG4VGeaqUYXz9YatMSNa_ZCLr28WTVgEc14vXEGR996kLpW1S3V8NRL02XY9_l903cAM_eKou0o38F1APxkO60CSkMlTYMNCWe8B22meyKeW23PKMxzBY17yMVsKYRaebq5ZTYYhi2doRF1ofL68FFt5PaDFBe-V9RFS2X5dFXmVDU4piKyVsuny1kXWxFhsmt13VcrmqW8G6THMB2jeYS8JYm8oR46EcWKoGe49hNrP_J6IaljOWF0Ve5Ku8qJdtAZVY57xaVduiKgqyymHkSi8TTvpTyVwzQYrYe9zUygf_usn9VBcw8UaGQQUNzbvdxMVUbzEsbLeYa67Tlk89jFWVdAjZRLeZuP4GJt-FCw>53107</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Clang doesn't warn about out-of-range float to int cast
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang:frontend
      </td>
    </tr>

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

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

<pre>
    Consider: (https://godbolt.org/z/K3aWWK8a4)

```
unsigned f() {
    return (unsigned)4294967808.;
}
```

Since the value is out of range, the behaviour is undefined and LLVM will optimize the result to undef, which is probably not what the developer wanted.

Clang doesn't warn there. It would warn however, if the conversion were implicit:

```
unsigned g() {
    return 4294967808.;
}

<source>:6:12: warning: implicit conversion of out of range value from 'double' to 'unsigned int' is undefined [-Wliteral-conversion]
    return 4294967808.;
    ~~~~~~ ^~~~~~~~~~~
```

Perhaps it would make sense to warn in both cases?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyNVE1vozAQ_TXmYgWBgRAOHNq0kVbtSiuttD0bPIB3jR35I1H763dMkm0bdatGxmDP-M2bN-N0Rjy3W6OdFGBJcUMJ20ze7x1-E7bDMRrRGeVTY0dcveDzUPCnp4cNLwlrSHZHspvzvM7OY1kGBB01CDogJrpSUt-eLBR_FnywOoa7-KFLiaNZ15tsk5Li7Ezquw_hT_NPqXugfgJ64CoAlY6a4KkZqOV6BMK2i7GDiR-kCTY6BC1gkJEZ14I-Pv76To9SKWr2Xs7y5QRnwQXlqTcn9wh0nGQ_RYC9NR3v1DPVxuMu98sJAQdQZg-WHrn2INK3PLcK6VBhwGnCajzFMXk8ZSGl33BpghKnzckcEcjGgHJYgHujccNJo-kRD1A575XspY8l-oL84yfyfy74aS62DoXrgRT3GHGNT85ip0S2Uo_x88LoLVUswdtKnOszWDNj0WthQqewPHVUGF__2Ert4-67MpHqdvWkpAfL1eo1BKnuvpRQNJP6_mog6vXW9fh_2_0AO_G9o_JSupn_AepAO4gJLYWUmnbGT7TnDvA67RLRFqIpGp546RW0H7YE7xbRgl-ZYXUSblCGL42I0kQwnwSr2qtLKv0UurQ3My6UOlxeK2zV39CjpDvpXEAebFcVeVYnU1sKIdYNE021EXXVlDWDCnIm6jyvhoKtE8U7UK5F9QljfWSL8bCA2NwabytD_RPZsoyxLM-zPCuzfJP2OdRdlfG6rJscoUiZwcylSiOd-CeS2HZh1oXRoVFJ592rkbulD2CJivg8-MnY9mU2AuZkyaFdEvgLxt9uiQ">