From 871d22aae20c3445e9a69d4bd75b77261e03171c Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Tue, 27 Oct 2026 17:25:29 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9A=20docs(coding-rules):=20added=20ru?= =?UTF-8?q?le=20prohibiting=20#pragma=20optimize=20overrides?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CODING_RULES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CODING_RULES.md b/CODING_RULES.md index 0138c0d..be85731 100644 --- a/CODING_RULES.md +++ b/CODING_RULES.md @@ -243,6 +243,8 @@ Never use `/utf-8`, and never save sources as CP949/EUC-KR. - Prefer the original programmer's types and algorithms over instruction-shaped C++. Byte identity is a bonus, never a reason for cryptic code. Use compiler intrinsics only with clear evidence that the original source used them; an optimized SIMD instruction alone is not evidence. Scalar data is not `__m128i`. +- Do not use `#pragma optimize` (including `#pragma optimize("y", off)`) to alter compiler optimization or frame-pointer settings. + Use the configured project compiler settings; byte matching does not justify source-level optimization overrides. - Recover records and members instead of dereferencing integer pointers cast onto byte buffers. At a real binary-format boundary, use a typed record or `memcpy` for unaligned fields; preserve layout and aliasing. - Apply namespace and API conventions consistently throughout a subsystem, including declarations and callers.