{
#ifdef NDEBUG
fprintf(stderr,
- "insufficient reservation\n")
+ "insufficient reservation\n");
#else
fprintf(stderr,
"insufficient %s reservation in line %d\n",
/* Define a label OP and emit a case statement for OP. For use in the
* dispatch function. The slightly peculiar goto that is never
* executed avoids warnings about unused labels. */
-#define CASE(OP) if (0) goto OP; OP: case OP
+#if __GNUC__ > 6
+#define CASE(OP) OP: __attribute__((unused)); case OP
+#else
+#define CASE(OP) case OP: if (0) goto OP; OP
+#endif
#else /* USE_THREADED_CODE */
#define s_thread_to(sc, a) s_goto(sc, a)
#define CASE(OP) case OP
#endif /* USE_THREADED_CODE */
+#if __GNUC__ > 6
+#define FALLTHROUGH __attribute__ ((fallthrough))
+#else
+#define FALLTHROUGH /* fallthrough */
+#endif
+
/* Return to the previous frame on the dump stack, setting the current
* value to A. */
#define s_return(sc, a) s_goto(sc, _s_return(sc, a, 0))
putstr(sc,"\nEval: ");
s_thread_to(sc,OP_P0LIST);
}
- /* fall through */
+ FALLTHROUGH;
CASE(OP_REAL_EVAL):
#endif
if (is_symbol(sc->code)) { /* symbol */
free_cons(sc, sc->args, &callsite, &sc->args);
sc->code = car(sc->args);
sc->args = cdr(sc->args);
- /* Fallthrough. */
+ FALLTHROUGH;
CASE(OP_APPLY): /* apply 'code' to 'args' */
#if USE_TRACING
putstr(sc,"\nApply to: ");
s_thread_to(sc,OP_P0LIST);
}
- /* fall through */
+ FALLTHROUGH;
CASE(OP_REAL_APPLY):
#endif
#if USE_HISTORY
s_thread_to(sc,OP_APPLY);
}
}
-
#else
CASE(OP_LAMBDA): /* lambda */
sc->value = sc->code;
- /* Fallthrough. */
#endif
+ FALLTHROUGH;
CASE(OP_LAMBDA1):
gc_disable(sc, 1);
};
#endif
-scheme *scheme_init_new() {
+scheme *scheme_init_new(void) {
scheme *sc=(scheme*)malloc(sizeof(scheme));
if(!scheme_init(sc)) {
free(sc);
sc->fcells = 0;
sc->inhibit_gc = GC_ENABLED;
sc->reserved_cells = 0;
+#ifndef NDEBUG
sc->reserved_lineno = 0;
+#endif
sc->no_memory=0;
sc->inport=sc->NIL;
sc->outport=sc->NIL;