prog.c:4:5: error: unknown type name 'size_t'
size_t tos;
^
prog.c:5:5: error: unknown type name 'size_t'
size_t length;
^
prog.c:11:5: error: unknown type name 'size_t'
size_t length;
^
prog.c: In function 'fatal':
prog.c:15:5: error: implicit declaration of function 'fprintf' [-Werror=implicit-function-declaration]
fprintf(stderr, "pizdariki: %s\n", message);
^
prog.c:15:5: error: incompatible implicit declaration of built-in function 'fprintf' [-Werror]
prog.c:15:5: note: include '<stdio.h>' or provide a declaration of 'fprintf'
prog.c:15:13: error: 'stderr' undeclared (first use in this function)
fprintf(stderr, "pizdariki: %s\n", message);
^
prog.c:15:13: note: each undeclared identifier is reported only once for each function it appears in
prog.c:16:5: error: implicit declaration of function 'exit' [-Werror=implicit-function-declaration]
exit(EXIT_FAILURE);
^
prog.c:16:5: error: incompatible implicit declaration of built-in function 'exit' [-Werror]
prog.c:16:5: note: include '<stdlib.h>' or provide a declaration of 'exit'
prog.c:16:10: error: 'EXIT_FAILURE' undeclared (first use in this function)
exit(EXIT_FAILURE);
^
prog.c: At top level:
prog.c:44:38: error: unknown type name 'size_t'
static void stack_init(stack *stack, size_t length) {
^
prog.c: In function 'stacklist_init':
prog.c:55:5: error: unknown type name 'size_t'
size_t list_length;
^
prog.c:56:5: error: implicit declaration of function 'printf' [-Werror=implicit-function-declaration]
printf("Type number of stacks: ");
^
prog.c:56:5: error: incompatible implicit declaration of built-in function 'printf' [-Werror]
prog.c:56:5: note: include '<stdio.h>' or provide a declaration of 'printf'
prog.c:57:10: error: implicit declaration of function 'scanf' [-Werror=implicit-function-declaration]
if (!scanf("%zu", &list_length)) {
^
prog.c:57:10: error: incompatible implicit declaration of built-in function 'scanf' [-Werror]
prog.c:57:10: note: include '<stdio.h>' or provide a declaration of 'scanf'
prog.c:57:16: error: format '%zu' expects argument of type 'size_t *', but argument 2 has type 'int *' [-Werror=format=]
if (!scanf("%zu", &list_length)) {
^
prog.c:62:20: error: implicit declaration of function 'malloc' [-Werror=implicit-function-declaration]
list->stacks = malloc(sizeof(*list->stacks) * list_length);
^
prog.c:62:20: error: incompatible implicit declaration of built-in function 'malloc' [-Werror]
prog.c:62:20: note: include '<stdlib.h>' or provide a declaration of 'malloc'
prog.c:67:10: error: unknown type name 'size_t'
for (size_t i = 0; i < list_length; i++) {
^
prog.c:68:9: error: unknown type name 'size_t'
size_t stack_length;
^
prog.c:70:14: error: incompatible implicit declaration of built-in function 'scanf' [-Werror]
if (!scanf("%zu", &stack_length)) {
^
prog.c:70:14: note: include '<stdio.h>' or provide a declaration of 'scanf'
prog.c:70:20: error: format '%zu' expects argument of type 'size_t *', but argument 2 has type 'int *' [-Werror=format=]
if (!scanf("%zu", &stack_length)) {
^
prog.c:73:9: error: implicit declaration of function 'stack_init' [-Werror=implicit-function-declaration]
stack_init(&list->stacks[i], stack_length);
^
prog.c: At top level:
prog.c:19:18: error: 'stack_get' defined but not used [-Werror=unused-function]
static valuetype stack_get(stack *stack) {
^
prog.c:27:18: error: 'stack_pop' defined but not used [-Werror=unused-function]
static valuetype stack_pop(stack *stack) {
^
prog.c:35:13: error: 'stack_push' defined but not used [-Werror=unused-function]
static void stack_push(stack *stack, valuetype value) {
^
prog.c:54:13: error: 'stacklist_init' defined but not used [-Werror=unused-function]
static void stacklist_init(stacklist *list) {
^
cc1: all warnings being treated as errors