<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/66790>66790</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang][c++] Compile error in the weak alias
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ipasichnyk
</td>
</tr>
</table>
<pre>
Want to bring attention to the similar https://github.com/llvm/llvm-project/issues/53916
clang v18 still fails on
```
#include <iostream>
extern "C" {
static const char* do_something_original (void)
{
return NULL;
}
const char* do_something (void) __attribute__((weak, alias("do_something_original")));
}
```
with an error
```
aliasing.cpp:8:56: error: alias must point to a defined variable or function
const char* do_something (void) __attribute__((weak, alias("do_something_original")));
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzEU8GOmzAQ_ZrhMmpkbCBw4ECS5rTqreoxMsaB6Rob2Sbb_fsKSLp72PbQy0ojMGPPzOP5PRkC9VbrGvID5KdEznFwvqZJBlKDfX1OWte91j-kjRgdtp5sjzJGbSM5u6TioDHQSEZ6HGKcAogG-Bn4uac4zO1OuRH42Zjb4_Vl8u6nVhH4mUKYdQB-zkWVFsBOwBplpO3xlpYYIhmDV0kmoLPb7v1ZsHtsn1yQVWbuNII4kgvRazmC-Lpt619Re4vA-RE4R9gftjxiiDKSQuVsiKgG6YE32LlLcKOOA9n-4jz1ZKVB4OXNUQe8ehS_64PodZy9xW_fn55AHN6OnO7Lv4941xkvFxmjp3aO-nIBXgIvX7R8Bn5EaUiGNcU_BAicL9i2eCD4M_9D2l4oDigtau-d_8e5dTTZfqemCURTgmjyAkRzLxTNBg7HOUScHG1akdjpK1nd4U16kq3R6DxeZ6sW6TwY-iReHj-YdLXoKlHJRNdpUeVplhaMJUO9z7JO6atQ17QQaVUWVZlne1FliqWiK7uEas64YFVapUXGGNsVSrNUs1bItuiqTELG9CjJ7BbN75zvk1XtdVHsK5YY2WoTVttxvkp-AZqfEl-vHmnnPkDGDIUY3jpEimb16laRn5Yl8MMS-QmPbpzI6O1ekOxqzoWo-wUlszf1_5t0Rf47AAD__-NqR5w">