https://bugs.llvm.org/show_bug.cgi?id=51889
Bug ID: 51889
Summary: error: comparison of distinct pointer types ('int *'
and 'int * __ptr32')
Product: clang
Version: 12.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: akhu...@google.com
Reporter: ararmi...@gmail.com
CC: llvm-bugs@lists.llvm.org, neeil...@live.com,
richard-l...@metafoo.co.uk
1. cat test.cpp
extern "C"
int printf(const char *,...);
int* b = (int*)-1;
int main()
{
if (b == (int * __ptr32) -1)
printf("values are the same\n");
else
printf("values are different\n");
}
2. clang -fsyntax-only -target x86_64-windows-msvc -fms-extensions test.cpp
test.cpp:8:9: error: comparison of distinct pointer types ('int *' and 'int *
__ptr32')
if (b == (int * __ptr32) -1)
~ ^ ~~~~~~~~~~~~~~~~~~
1 error generated.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs