<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/90001>90001</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang misleading diagnostic: error: 'f' requires 'float' type support, but ABI 'aapcs' does not support it
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang,
clang:diagnostics
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
jroelofs
</td>
</tr>
</table>
<pre>
```
float f(void) { return 1.f; }
```
+
```
-mgeneral-regs-only
```
gives:
```
<source>:1:7: error: 'f' requires 'float' type support, but ABI 'aapcs' does not support it
1 | float f(void) { return 1.f; }
| ^
1 error generated.
```
https://clang.godbolt.org/z/d3vGv9ahM
The diagnostic should blame `-mgeneral-regs-only` instead of the ABI, which has been modified by the flag.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0ksGOmzAQhp9muIyCjA04HDiQZKl66K0vYPAAXhmc2iZV-vQVZNvdVrn0UITAjP9_8HwzKgQzLkQ1FCcoLola4-R8_eodWTeEpHP6XkPJ3m52AdYM1qmIA_DjzRkNvEKQJ_QUV79glg4gTgjy8hD_5QV-eho_zCMt5JU9eBrDwS32_lQ3mhsFEM3z5OIc3Op7AvECoslANBJEg-S989sCuByAS_T0bTWewh7YqtmC8X4lDOv16nwEfsZujdicPm8apa592DTaUcDFxV86NPHxa0TEDEGe8Z_o4H5ttrdV8fLYyB6HxgeVSDp9XvH-nGK87lB4C7ztrVrGdHS6czamzo_A2x_AWy1un26Vmr58tH6dCLVR4-JCND2Gya1WY2fVTAgle9aWkqFZQiSl0Q0YJ9oobcC-T6afcFIBO6IFZ6fNYEhjd99Vg1Vjiomuha5EpRKqM5mJqjqWlUymupPVsTsWxGSpZck71ZdM8oodu1wUTInE1JzxnOU85zzPC5nKI8tUIXjfV7JkA4Oc0ayMTa29zVvhiQlhpbpijGWJVR3ZsM855zsj4Bz4-feXaN5BhG2vuCS-3nIdunUMkDNrQgzv2aOJlurdjLMJlpQ2y_gB53-fvWT1tv6z-6OJ09qlvZuBt9tR316Hq3ev1Efg7U4lAG93MD8DAAD__3yyMJk">