Repository navigation
Conversation
This was referenced Sep 22, 2026
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.
Superseded by #28902
The refreshed #28902 at
b06d4abc97644a67a2e6fcf6de20936d273335dbincludes this PR'ssizeof(Callback)regression and passes it on current master6c359c2282. It fixes callback key conversion while retaining backed-enum typedef names, so this separate global naming change is no longer needed.Original proposal
Summary
V3 names fixed-array types in function pointer signatures through
TypeChecker.c_type(), which renders enum elements asint. The C generator usedvalue_c_type()for the emitted fixed-array typedef name, rendering the same enum asi32. The resulting C referencesArray_fixed_int_2while onlyArray_fixed_i32_2is declared.Use
TypeChecker.c_type()for enum elements when naming the generated typedef. Its element storage type remains unchanged. Add a regression case that compiles and runs a callback type with[2]Combinerthrough V3.Reproducer before this change
v -new-compiler -cc gcc main.vfails withunknown type name 'Array_fixed_int_2'.Validation
./v self./v fmt -won both touched files./v -silent test vlib/v/compiler_tests/fixed_array_typedef_codegen_test.v(pass)VJOBS=4 ./v -silent test vlib/v/gen/c/(25/25 pass)./v -new-compiler -cc gccafter the fix.I also attempted
./v -silent vlib/v/compiler_errors_test.v; the current V3runner disagreed with existing V1-format golden output for unrelated assertion
fixtures, so I stopped that broad run after the mismatch.
This was found while testing the Vulkan raw bindings' V3 C compatibility; the binding's platform declarations are separately guarded.