Rust-GCC / Rust-GCC/gccrs

Limit number of arguments for a function to `u16::MAX`

Open
#686 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

diagnostic parser
Dominant language
C++
Stars
2.9k
Forks
231
Avg merge
19h 55m
Merged PRs (30d)
67

Description

Kind of funny PR:

This limits the number of arguments that can be used by a function to 65535 = u16::MAX and emits an error if more arguments are used.

I think this is currently hard to implement a test for, since it practically requires macro expansion, but this is something that should be tested in the future.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Use Rust PR 88733 as the behavior reference, then locate the gccrs code that handles function argument counts and macro expansion. The work is done when functions with more than u16::MAX arguments produce an error, ideally with a regression test covering the limit.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.