[cfe-dev] Clang::SemaCXX/reinterpret-cast.cpp failing

Ahmed Charles ahmedcharles at gmail.com
Sun Nov 22 14:30:37 PST 2009


> We define intptr_t as a signed long unless the target overrides it.
> I attached a small untested patch that corrects it for Win64.
>

That patch worked.

These tests should also use intptr_t:

Clang::CodeGenCXX/reinterpret-cast.cpp (562 of 1789)
Clang::SemaCXX/cstyle-cast.cpp (1329 of 1789)
Clang::SemaCXX/functional-cast.cpp (1363 of 1789)

And this test fails for what is probably a similar reason, it should be a
unsigned long long, I think.

********************
FAIL: Clang::Parser/MicrosoftExtensions.c (827 of 1789)
******************** TEST 'Clang::Parser/MicrosoftExtensions.c' FAILED
********************
Script:
--
D:/acharles/llvm/x64-build/bin/Debug/clang-cc.exe -fsyntax-only -verify
-fms-extensions -x=objective-c++ D:\acharles\llv
m\src\tools\clang\test\Parser\MicrosoftExtensions.c
--
Exit Code: 1
Command Output (stdout):
--
Command 0: "D:/acharles/llvm/x64-build/bin/Debug/clang-cc.exe"
"-fsyntax-only" "-verify" "-fms-extensions" "-x=objective
-c++" "D:\acharles\llvm\src\tools\clang\test\Parser\MicrosoftExtensions.c"
Command 0 Result: 1
Command 0 Output:


Command 0 Stderr:
error: 'error' diagnostics seen but not expected:
  Line 12: cast from pointer to smaller type 'ULONG_PTR' (aka 'unsigned
long') loses information
2 diagnostics generated.


--
Command Output (stderr):
--
--


On a slightly unrelated note, is varargs (C style) supposed to work? It
seems that every test involving them crashes with a null pointer deference.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20091122/7153b61d/attachment.html>


More information about the cfe-dev mailing list