Skip to content

Conversation

@jgarzik
Copy link
Contributor

@jgarzik jgarzik commented Dec 11, 2025

No description provided.

@jgarzik jgarzik requested a review from Copilot December 11, 2025 06:48
@jgarzik jgarzik self-assigned this Dec 11, 2025
@jgarzik jgarzik added the enhancement New feature or request label Dec 11, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for C99 array parameter qualifiers, enabling the parser to handle static, const, volatile, and restrict keywords in array parameter declarations, as well as the VLA unspecified size notation [*].

Key Changes:

  • Parser enhancement to recognize and handle array parameter qualifiers (static, const, volatile, restrict) per C99 6.7.5.3
  • Implementation of VLA [*] syntax with proper disambiguation from pointer dereference expressions
  • Comprehensive test suite covering all qualifier combinations and edge cases

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
cc/tests/features/mod.rs Registers the new array_param_qualifiers test module
cc/tests/features/array_param_qualifiers.rs Adds 9 comprehensive tests covering static, const, volatile, restrict qualifiers, combined qualifiers, VLA [*] syntax, and edge cases like expressions with multiplication and pointer dereferencing
cc/parse/parser.rs Extends parse_parameter_list to parse array parameter qualifiers and VLA [*] syntax, converts array parameters to qualified pointers per C99 specification

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jgarzik jgarzik merged commit 0b2bfee into main Dec 11, 2025
4 checks passed
@jgarzik jgarzik deleted the updates branch December 11, 2025 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants