Skip to content
Snippets Groups Projects
Commit 55eb8f27 authored by Nagy Tibor's avatar Nagy Tibor
Browse files

Implement alloca.h

parent 9790289a
Branches
No related tags found
No related merge requests found
#ifndef _ALLOCA_H
#define _ALLOCA_H
#define alloca(size) __builtin_alloca (size)
#endif /* _ALLOCA_H */
# Binaries that should generate the same output every time
EXPECT_BINS=\
alloca \
args \
arpainet \
assert \
......
#include <alloca.h>
#include <stdio.h>
#include <string.h>
int main(int argc, char ** argv) {
char *str = (char *) alloca(17);
memset(str, 'A', 16);
str[16] = '\0';
printf("%s\n", str);
}
AAAAAAAAAAAAAAAA
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment