http://llvm.org/bugs/show_bug.cgi?id=2427
Summary: clang redefines size_t silently but then complains
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Semantic Analyzer
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
CC: [email protected]
clang doesn't compile the following code, although gcc happily compiles:
--------------
#include <stddef.h>
extern void* f(void** p, size_t s);
#include <stdlib.h>
void* f(void** p, size_t s)
{
}
--------------
I think the problem is with the redefinition of size_t in stdlib.h (a system
header) to something different from what is defined in stddef.h.
In Mac OS X, clang complains:
[EMAIL PROTECTED] ~] $ clang b.c
b.c:7:7: error: conflicting types for 'f'
void* f(void** p, size_t s)
^
b.c:2:14: error: previous declaration is here
extern void* f(void** p, size_t s);
^
2 diagnostics generated.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs