-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillaclang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"
Description
| Bugzilla Link | 2427 |
| Resolution | FIXED |
| Resolved on | Nov 07, 2018 00:21 |
| Version | unspecified |
| OS | All |
| CC | @efriedma-quic |
Extended Description
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:
[filcab@farnsworth ~] $ 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.
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillaclang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"