From 0305500e31eda6fe6da84f88748fc20843aebbce Mon Sep 17 00:00:00 2001 From: _ov4 Date: Sat, 17 Oct 2026 09:46:23 +0000 Subject: refactor(runtime): write runtime diagnostics with fprintf(stderr) Replace snprintf+write(2) with a single fprintf call on the platform's stderr: the C library's stderr / __stderrp, or __acrt_iob_func(2) on Windows, which the embedded runner binds to the host shim. Co-Authored-By: Claude Sonnet 5.5 --- lib/CodeGen/FunctionGen.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/CodeGen/FunctionGen.cc') diff --git a/lib/CodeGen/FunctionGen.cc b/lib/CodeGen/FunctionGen.cc index 4e70faf..d985bce 100644 --- a/lib/CodeGen/FunctionGen.cc +++ b/lib/CodeGen/FunctionGen.cc @@ -14,7 +14,7 @@ static bool isReservedRuntimeName(const std::string &Name) { static const char *Reserved[] = { "__cps_main", "printf", "scanf", "malloc", "free", "strlen", "memcpy", "strcpy", "strcat", "toupper", "tolower", "sprintf", "snprintf", "strtol", "strtoll", - "strtod", "memset", "exit", "write", + "strtod", "memset", "exit", "fprintf", "fopen", "fclose", "fgetc", "ungetc", "fputs", "fputc", "realloc", "strcmp", "__cxa_allocate_exception", "__cxa_throw", "__cxa_begin_catch", "__cxa_end_catch", "__gxx_personality_v0", -- cgit v1.3.1-4-g156e