<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/98548>98548</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[libc] GCC reports a warning when using `[[gnu::visibility("hidden")]]` with `LIBC_NAMESPACE`
</td>
</tr>
<tr>
<th>Labels</th>
<td>
libc
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
petrhosek
</td>
</tr>
</table>
<pre>
After #98075, we're seeing the following warning on GCC builders:
```
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/big_int.h: In instantiation of ‘constexpr __llvm_libc_19_0_0_git::cpp::array<word, N> __llvm_libc_19_0_0_git::multiword::shift(__llvm_libc_19_0_0_git::cpp::array<word, N>, size_t) [with Direction direction = __llvm_libc_19_0_0_git::multiword::RIGHT; bool is_signed = false; word = long unsigned int; long unsigned int N = 5; size_t = long unsigned int]’:
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/big_int.h:760:61: required from ‘constexpr __llvm_libc_19_0_0_git::BigInt<Bits, Signed, WordType> __llvm_libc_19_0_0_git::BigInt<Bits, Signed, WordType>::operator>>(size_t) const [with long unsigned int Bits = 320; bool Signed = false; WordType = long unsigned int; size_t = long unsigned int]’
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/float_to_string.h:390:29: required from here
/home/llvm-libc-buildbot/buildbot-worker/libc-x86_64-debian-fullbuild/libc-x86_64-debian-gcc-fullbuild-dbg/llvm-project/libc/src/__support/big_int.h:281:28: error: ‘__llvm_libc_19_0_0_git::multiword::shift<__llvm_libc_19_0_0_git::multiword::RIGHT, false, long unsigned int, 5>(__llvm_libc_19_0_0_git::cpp::array<long unsigned int, 5>, size_t)::<lambda(size_t)>’ declared with greater visibility than the type of its field ‘__llvm_libc_19_0_0_git::multiword::shift<__llvm_libc_19_0_0_git::multiword::RIGHT, false, long unsigned int, 5>(__llvm_libc_19_0_0_git::cpp::array<long unsigned int, 5>, size_t)::<lambda(size_t)>::<array capture>’ [-Werror=attributes]
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsll9v2zYQwD8N_UI4oEnr34MebNnuAmzFsBToo0BJJ4krLWokFTf79MNRdpwiaVfvLcAAQ6bIuyPv-LvTSedUNwDkJNqSaLeQk--NzUfwtjcOviwq0zzlm9aDpYSLLGVJRHhBT0B4YoE6ADV01PdAW6O1OeHbSdoB_81APxQFrSalG7COiA1hO8Iuz5idf_MrP_TmCIQftH48LrWq6mXQrIwn_HAZLk_GfgGLYijxNY3LeL1soFJyWLaT1kHw7eWurq8iy6bqLpuN1vwJtT9rEX5wFp9l6aZxNDbsr7pSDf6uJ2JD7weqBufl4JX0ygzUtJTsOUkZydLaDM7D19HSskTrJdosV1nJSlZ2ymMYxKYex3kgrZVPRBQnYxuM7Eci9j_UPE7aqyAdXl2vWk94-p83w3-n_obSE55REm1Pyvd0pyzUwbfmeUTE7paT_XH_4ZdPRGxpZYymypUBtSaYaaV2gGsoHma0GTo6DWcZNXhcfTVJPwbhCBfnQ39HOdpdLiS7cvd-EEtiRsQmXiFtlFr4a1IWGtpac7yVtK3q7jGaxVZ5h5f9EKKEo8_GNp-eRvg35H7OxCxrRrDSGxsm9oSnV7bCeZ8Je323aD1cp-DsmZuHN6C5bPp9cH6ajfcARquN9KU3pfNWDV0ARGQICM_eAqQHC-_CsZfE83QVnugQWIsAba6o31wQRXFzpeLFmTBevAENL7Dq7G-ttD8w9KLszjooLo9VI19mDYpeaKUN1FriPYcM6ixI_DA_KqcqpZV_or6XQ_gae0wP01JMqVaBbv6P5RzLy2owSms5-snCN0Em0Xb5-YzgTnpvVTV5cFg2vm1cFk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