Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
emscripten-core
GitHub Repository: emscripten-core/emscripten
Path: blob/main/test/core/test_alloca.c
4150 views
1
/*
2
* Copyright 2016 The Emscripten Authors. All rights reserved.
3
* Emscripten is available under two separate licenses, the MIT license and the
4
* University of Illinois/NCSA Open Source License. Both these licenses can be
5
* found in the LICENSE file.
6
*/
7
8
#include <stdio.h>
9
#include <stdlib.h>
10
#include <assert.h>
11
12
int main(int argc, char **argv) {
13
char *pc, *pc2;
14
assert(argc == 1);
15
pc = (char *)alloca(4+argc);
16
assert(((uintptr_t)pc) % 4 == 0);
17
pc2 = (char *)alloca(4+argc);
18
assert(((uintptr_t)pc2) % 4 == 0);
19
printf("z:%p*%p*\n", pc, pc2);
20
return 0;
21
}
22
23