From b5b3e89f9e6735eb33eedd2b3071acd38222ee04 Mon Sep 17 00:00:00 2001 From: seyko Date: Wed, 13 Apr 2016 06:17:02 +0300 Subject: Fix pragma once guard From: Vlad Vissoultchev Date: Mon, 11 Apr 2016 01:26:32 +0300 Subject: Fix pragma once guard when compiling multiple source files When compiling multiple source files directly to executable cached include files guard was incorrectly checked for TOK_once in ifndef_macro member. If two source files included the same header guarded by pragma once, then the second one erroneously skipped it as `cached_includes` is not cleared on second `tcc_compile` --- tcc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tcc.c') diff --git a/tcc.c b/tcc.c index d373980..94def68 100644 --- a/tcc.c +++ b/tcc.c @@ -344,7 +344,7 @@ int main(int argc, char **argv) tcc_parse_args(s, argc - 1, argv + 1); tcc_set_environment(s); if (s->output_type != TCC_OUTPUT_OBJ) - tcc_error("interlnal error"); + tcc_error("internal error"); tcc_set_output_type(s, s->output_type); } } -- cgit v1.3.1