compilation fix

This commit is contained in:
ProgramSnail 2024-12-15 16:34:55 +03:00
parent b85b694d78
commit 7784696b65
2 changed files with 4 additions and 3 deletions

View file

@ -20,13 +20,13 @@ extern size_t __gc_stack_top, __gc_stack_bottom;
#define POST_GC() \ #define POST_GC() \
if (flag) { __gc_stack_top = 0; } if (flag) { __gc_stack_top = 0; }
_Noreturn static void vfailure (char *s, va_list args) { static void vfailure (const char *s, va_list args) {
fprintf(stderr, "*** FAILURE: "); fprintf(stderr, "*** FAILURE: ");
vfprintf(stderr, s, args); // vprintf (char *, va_list) <-> printf (char *, ...) vfprintf(stderr, s, args); // vprintf (char *, va_list) <-> printf (char *, ...)
exit(255); exit(255);
} }
_Noreturn void failure (char *s, ...) { void failure (const char *s, ...) {
va_list args; va_list args;
va_start(args, s); va_start(args, s);

View file

@ -2,6 +2,7 @@
#define __LAMA_RUNTIME__ #define __LAMA_RUNTIME__
#include "runtime_common.h" #include "runtime_common.h"
#include <assert.h> #include <assert.h>
#include <ctype.h> #include <ctype.h>
#include <errno.h> #include <errno.h>
@ -16,6 +17,6 @@
#define WORD_SIZE (CHAR_BIT * sizeof(ptrt)) #define WORD_SIZE (CHAR_BIT * sizeof(ptrt))
_Noreturn void failure (char *s, ...); void failure (const char *s, ...);
#endif #endif