<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/114535>114535</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Syntax error when compiling C example with 32-bit address space
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ararmine
</td>
</tr>
</table>
<pre>
Clang issues a syntax error for the following C example example:
Tried with **x86-64 clang 19.1.0** version.
1. cat example.c
`typedef int (*__ptr32 fptr1)();
typedef int (* __ptr32 fptr5)(fptr1);
int f5 (int (int()));
int f5 (fptr5 fp)
{
return 5;
}`
2. clang example.c -fms-extensions
```
example.c:4:5: error: conflicting types for 'f5'
int f5 (fptr5 fp)
^
example.c:3:5: note: previous declaration is here
int f5 (int (int()));
^
1 error generated.
```
NOTE: When compiling the example as a C++ source, there is no error.
x64 MSVC v.19 gives a warning for the C example:
example.c
<source>(4): warning C4028: formal parameter 1 different from declaration
I am not sure if this a bug.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUVE2PqzYU_TVmcxVkXyCQBYtMZiJ10Xbxntrlk4ELuAIb2SbJ_PvKQD5ep1JVCUFi-9yPc66PdE51mqhk2RvL3iM5-97YUlppR6UpqkzzWZ4GqTtQzs3kQIL71F7egKw1FlpjwfcErRkGc1W6gxPQTY7TQPcvS47A-Dvjx-9WUQNX5XtgeGR4vBX73T6FekkgDrGI-boBF7JOGR2vwPUtYqilv4eN621vz_3nRA21oLQHhgXD448fk7cJQjt5KxgeltUDS95WzFcAvCKyFfEA32HheJsFxAZU2m-R1-frwSUctFPYXcvNtzMAlvxsNWQPGMvf2Z6_tozxRs6jadi1o9vRzZMOBLkHCduz_H1SlBxTlhyzoMEiWPhRG90OqvZBrcCEW1RkmLcZw_w_OwCWfXxNk9zTaOMXySdLF2VmBw3Vg7TSK6NBOejJ0v-kEwCeScU2eR1pstJTE_8rBev7t9-_f4Ri_uxJQ23GSQ1L1_1jOkGGmT4xfGP4Bs7MtiaGp3DEUqhXmzXhT6N426fw67c_TnCJxQE6dVluxlVaHcLfL8Xp5Qr8k7E1WHLaMiYfDIt0afr4iHNKORZhoTV2lANM0sqRPFkQ0Ki2JUuBQmvGV5Jf6_wF5BgUATeHblrwvQqVVnMXQ9SUSXNIDjKiUuQJT_dZKnjUl1VeFLxKpcCcp1IWeSIkJVnKMTlU-7qOVIkcUyG4EJhxnsdIhFSIJm9QirSoWMpplGqIh-EyxsZ20WIfpRBplmTRICsa3GI6iJquq7kwxOBBtgygXTV3jqV8UM67Zxiv_EDlt1cLuv6s7dN_FqNJcFcpD7JpLDkHbpI1RbMdyt77yQVh8Mzw3Cnfz1Vcm5HhOWTbPrvJmr-o9gzPqwEyPG9NXEr8OwAA__8Db5MA">