[llvm-bugs] [Bug 45499] New: CXUnsavedFile and CXTUResourceUsageEntry use unsigned long
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Apr 11 09:13:35 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=45499
Bug ID: 45499
Summary: CXUnsavedFile and CXTUResourceUsageEntry use unsigned
long
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: libclang
Assignee: unassignedclangbugs at nondot.org
Reporter: tagoo at outlook.com
CC: klimek at google.com, llvm-bugs at lists.llvm.org,
richard-llvm at metafoo.co.uk
CXUnsavedFile and CXTUResourceUsageEntry are currently using `unsigned long`
for fields they contain.
`long` does not have a consistent size between Windows and Unix and this makes
it difficult to create generic bindings over the provided C API.
In particular, `long` is always 32-bits on Windows but it is pointer sized on
Unix systems. This also means that Windows is more limited in how the structs
can be used.
Ideally, these would be updated to be `size_t` so that it is pointer sized on
all platforms. This would also allow higher level languages, such as C#, to
provide a single consistent binding using their own `size_t` equivalent.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200411/aae53b94/attachment-0001.html>
More information about the llvm-bugs
mailing list