You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clang now will reject it due to [module.intefcae] p6. But we think the rejection may not be necessary. Since the intention of [module.intefcae] p6 is to avoid the name conflicting. But the entities in language linkage are always attached to global module. So we don't need to worry about the name conflicting here.
Clang now will reject it due to [[module.intefcae] p6](https://eel.is/c++draft/module.interface#6). But we think the rejection may not be necessary. Since the intention of [[module.intefcae] p6](https://eel.is/c++draft/module.interface#6) is to avoid the name conflicting. But the entities in language linkage are always attached to global module. So we don't need to worry about the name conflicting here.
Closellvm#98583
Currently, clang will reject the following code:
```
export module mod;
extern "C++" void func();
export extern "C++" {
void func();
}
```
while both MSVC and GCC accept it. Although clang's behavior matches the
current wording, from the discussion, the consensus is that we should
accept the above example from the intention. Since the intention to not
allow export redeclaration which is not exported is to make the linkage
clear. But it doesn't matter with the declarations within global module.
This is discussed in WG21's mailing list. Although this is not formally merged into the standard, I think it is fine to work on it already.
Reproducer:
Clang now will reject it due to [module.intefcae] p6. But we think the rejection may not be necessary. Since the intention of [module.intefcae] p6 is to avoid the name conflicting. But the entities in language linkage are always attached to global module. So we don't need to worry about the name conflicting here.
And both MSVC and GCC accept it: https://godbolt.org/z/74sTe4nP6
The text was updated successfully, but these errors were encountered: