Implicit Function Declaration Issue #21756
Labels
Bug
This tag is applied to issues which reports bugs.
Unit: cgen
Bugs/feature requests, that are related to the default C generating backend.
Describe the bug
This may or may not be a bug. Posting for discussion.
Reproduction Steps
Started out with this function which compiles and runs successfully
To eliminate the repeated code in the map functions I refactored as follows:
The refactored code generated an error message.
However, if I lift the
map_fn
out of the function, it compiles and works fine.Expected Behavior
Should the second method compile?
Current Behavior
See error message above
Possible Solution
No response
Additional Information/Context
No response
V version
V 0.4.6 fccd7cd
Environment details (OS name and version, etc.)
V full version: V 0.4.6 8215f21.fccd7cd
OS: macos, macOS, 14.5, 23F79
Processor: 8 cpus, 64bit, little endian, Apple M2
getwd: /Users/mike/Documents/github/coreutils/src/sort
vexe: /Users/mike/Documents/github/v/v
vexe mtime: 2024-06-27 19:39:41
vroot: OK, value: /Users/mike/Documents/github/v
VMODULES: OK, value: /Users/mike/.vmodules
VTMP: OK, value: /tmp/v_501
Git version: git version 2.45.2
Git vroot status: weekly.2024.26-11-gfccd7cd0 (3 commit(s) behind V master)
.git/config present: true
CC version: Apple clang version 15.0.0 (clang-1500.3.9.4)
thirdparty/tcc status: thirdparty-macos-arm64 5c1d002f
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: