| Issue |
180679
|
| Summary |
[libc++] `error_condition` and `path::iterator` cause issues with visibility pragmas
|
| Labels |
libc++
|
| Assignees |
|
| Reporter |
var-const
|
https://github.com/llvm/llvm-project/pull/132602 removed visibility attributes from certain declarations (`error_condition` and `filesystem::path::iterator`). This creates an inconsistency between the declaration and the definition (which still has the attribute) if a user changes the default visibility via a pragma. The following code demonstrates both of these issues ([Godbolt](https://godbolt.org/z/48z454dn5)):
```cpp
#pragma GCC visibility push(hidden)
#include <filesystem>
```
```
<...>/error_condition.h:49:7: error: visibility does not match previous declaration
49 | class _LIBCPP_EXPORTED_FROM_ABI error_condition {
| ^
<...>/path_iterator.h:26:7: error: visibility does not match previous declaration
26 | class _LIBCPP_EXPORTED_FROM_ABI path::iterator {
| ^
```
While this pragma is a non-standard extension, it seems like supporting it is rather easy.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs