| Issue |
174338
|
| Summary |
[clang] c++ -Wregister is issued for declarations included via extern "C"
|
| Labels |
clang
|
| Assignees |
|
| Reporter |
Fat-Zer
|
When compiling C++ code like:
```cpp
extern "C" {
int foo(register int num);
}
```
clang issues a warning (escalated to an error by default):
```
foo.cpp:2:9: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
2 | int foo(register int num);
| ^~~~~~~~
1 error generated.
Compiler returned: 1
```
But `register` is still a valid C keyword and clang shouldn't apply C++ rules to it.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs