Fix 'main' return value
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 2.9k
- Forks
- 230
- Avg merge
- 19h 55m
- Merged PRs (30d)
- 67
Description
As discussed in https://gcc-rust.zulipchat.com/#narrow/stream/281658-compiler-development/topic/Testsuite/near/230597886:
We're currently synthesizing a
void mainfunction (see-fdump-tree-gimple); this should (for now) probably beint main, plus the usualreturn 0at the end.
(I'm aware of https://github.com/Rust-GCC/gccrs/issues/144 "Implement main shim" which probably needs to be completed to resolve this properly.)
Fixing this (so that we get deterministic normal process termination) is a prerequisite for #281 "Create runnable test folder".
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing where gccrs synthesizes the current void main function, then review issue #144 for the main-shim context. Change the generated entry point to return int with a normal zero return, and verify that this resolves the prerequisite for the runnable test folder in issue #281.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100