[cfe-commits] r137903 - in /cfe/trunk: include/clang/Basic/Builtins.def include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Sema/SemaChecking.cpp test/Sema/warn-strlcpycat-size.c
Eli Friedman
eli.friedman at gmail.com
Thu Aug 18 13:22:18 PDT 2011
On Thu, Aug 18, 2011 at 1:15 PM, Ted Kremenek <kremenek at apple.com> wrote:
> On Aug 17, 2011, at 7:42 PM, Benjamin Kramer wrote:
>
>>
>> On 17.08.2011, at 19:21, Ted Kremenek wrote:
>>
>>> I've gone and reverted the change, pending a fix to get it working on Windows.
>>>
>>> I think the crux of the matter is the definition of strlen, strlcpy, and strlcat as built-ins, and that not being compatible with how they are defined on Windows.
>>>
>>> If possible, could you provide me those definitions from Windows? Thanks.
>>
>> It's just size_t being int instead of long on windows (and possibly on other platforms)
>>
>> Using a target neutral typedef for size_t (like "__SIZE_TYPE__" or "__typeof__(sizeof(int))")
>> should make it work on windows.
>>
>> - Ben
>
> After looking at the patch again, I don't think this is the issue. We are defining these builtins to use size_t.
The patch is correctly defining size_t; the test is not.
-Eli
More information about the cfe-commits
mailing list