Repository navigation
[AUTOMATED] Reconcile pointer slots with integer CAST results - #1249
Merged
Merged
Conversation
The PE32 cases compiled the sample for i686-w64-windows-gnu with `#include <stdint.h>`, which needs a MinGW sysroot; on a host whose clang has no such headers the three PE32 tests failed instead of exercising kuna. Use the compiler's builtin `__UINTPTR_TYPE__` so the freestanding sample needs no target headers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BEr111CDLJsQMzY3YSyWXD
…NULL as 0 A pointer addition or member address assigned to integer storage still printed without a cast (`frame[0] = &value[1];`), which gcc 15 and clang reject. Treat PTRADD and PTRSUB statements like pointer copies. A copied variable whose own declaration is an integer gained a redundant cast (`cout = (unsigned long)cstart;` with `unsigned long cstart`); skip it when the source variable is declared as a non-pointer. A null pointer constant copied into integer storage now prints as `0` instead of `(long)NULL`. Adds two derived-pointer round-trip cases to the pointer-slot test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BEr111CDLJsQMzY3YSyWXD
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BEr111CDLJsQMzY3YSyWXD
…headers from the test The fallback member lookup preferred the high's mapped Symbol type for every variable. For a scalar local or global that type can differ from the type its declaration prints (tar _help declares `unsigned long v50` but its Symbol is `hol *`; a named global is declared at the type its accesses print), so the pointer cast that Noelo-Lab#1241 added (`v50 = (unsigned long)v22;`, `current_block = (long)v6;`) was dropped again and the C stopped compiling. Use the Symbol type only when it is a structure, array or union, where the declaration representative covers just the field. The printer test now uses __UINTPTR_TYPE__ instead of <stdint.h>, so the PE32 compile does not need a mingw sysroot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BEr111CDLJsQMzY3YSyWXD
…to fix/integer-to-pointer-slots Resolve kuna_pointerstorecast.rs: match COPY, CAST, PTRADD and PTRSUB; keep this branch's CAST result type, widened source filter and two-way tail; keep Noelo-Lab#1241's early return for a COPY whose input is declared a non-pointer, but only when the source is a pointer, so it does not block the integer-to-pointer COPY case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BEr111CDLJsQMzY3YSyWXD
Resolve the kuna-cli integration.rs module list by keeping both sides. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BEr111CDLJsQMzY3YSyWXD
Contributor
|
[AUTOMATED] Pushed three commits:
|
Noelo-Lab#1241 landed as a squash; this re-applies only Noelo-Lab#1249's own changes on top of main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BEr111CDLJsQMzY3YSyWXD
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An asserted pointer member can receive an integer carrier without the cast C requires. A CAST statement can also retain an integer result type after its destination is declared as a pointer.
Run only the new independent fixture against an unmodified engine:
Before:
frame.slot = value;fails Clang withincompatible integer to pointer conversion.The fixture renders real COPY/CAST statements and recompiles them with Clang for PE32 and native 64-bit C at
-O0/-O2; the native executable checks pointer preservation. Existing pointer-to-integer slot cases remain controls.