Issue |
146470
|
Summary |
wcschr omits wchar_t from the errors
|
Labels |
new issue
|
Assignees |
|
Reporter |
Alcaro
|
```c
#include <wchar.h>
void the_bug()
{
(void)wcschr(123, 0);
(void)wcsrchr(123, 0);
(void)wcsstr(123, 0);
}
```
C only; the bug does not reproduce in C++, where wchar_t is a keyword. Only specifically wcschr is affected, not even wcsrchr which has identical prototype.
Expected:
```
<source>:5:18: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const wchar_t *' (aka 'const int *') [-Wint-conversion]
<source>:6:19: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const wchar_t *' (aka 'const int *') [-Wint-conversion]
<source>:7:18: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const wchar_t *' (aka 'const int *') [-Wint-conversion]
```
Actual:
```
<source>:5:18: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const int *' [-Wint-conversion]
<source>:6:19: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const wchar_t *' (aka 'const int *') [-Wint-conversion]
<source>:7:18: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const wchar_t *' (aka 'const int *') [-Wint-conversion]
```
https://godbolt.org/z/sdMhhv3d3
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs