Turns out that '__builtin_alloca' takes 'unsigned long', not 'unsigned long long'; rename some parameters to align with C11 standard.

This commit is contained in:
Ziemowit Laski
2019-03-19 13:27:14 -07:00
parent 11ed4f3312
commit 09e729ff59
3 changed files with 9 additions and 9 deletions

View File

@@ -10,9 +10,9 @@ extern int w1, w2;
#define restrict __restrict__
#endif
void *__builtin_alloca(unsigned long long sz);
void *__builtin_alloca(unsigned long sz);
#define alloca __builtin_alloca
typedef unsigned long size_t;
typedef unsigned long long size_t;
int printf(const char *restrict format, ...);
void *memcpy(void *restrict s1, const void *restrict s2, size_t n);

View File

@@ -1,15 +1,15 @@
// semmle-extractor-options: --clang
int printf(const char *restrict format, ...);
int sprintf(char *restrict buf, const char *restrict format, ...);
typedef unsigned long size_t;
int sprintf(char *restrict s, const char *restrict format, ...);
typedef unsigned long long size_t;
void *memcpy(void *restrict s1, const void *restrict s2, size_t n);
void *malloc(size_t sz);
void *malloc(size_t size);
void free(void *ptr);
struct vtype { int i1, i2; };
extern int w1, w2;
void *_builtin_alloca(unsigned long long sz);
void *_builtin_alloca(unsigned long sz);
#define alloca __builtin_alloca
// We forward-declare the Microsoft routines

View File

@@ -6,10 +6,10 @@
#define restrict __restrict__
#endif
int sprintf(char *restrict buf, const char *restrict format, ...);
char * strdup(const char *restrict str1);
int sprintf(char *restrict s, const char *restrict format, ...);
char * strdup(const char *restrict s);
void *__builtin_alloca(unsigned long long sz);
void *__builtin_alloca(unsigned long sz);
#define alloca __builtin_alloca
// case 1: a GNU c/c++ lambda with an alloca in it