Skip to content

Fix #14629 syntaxError when not/compl is used as identifiers (C)#8384

Merged
danmar merged 1 commit intodanmar:mainfrom
cqse:not_as_parameter_name
Apr 9, 2026
Merged

Fix #14629 syntaxError when not/compl is used as identifiers (C)#8384
danmar merged 1 commit intodanmar:mainfrom
cqse:not_as_parameter_name

Conversation

@wilhelma
Copy link
Copy Markdown
Contributor

Fix false syntaxError when C alternative tokens (not/compl) are used as identifiers (parameters)

Minimal Example

static void foo(int not, int test)
{
  test = not;
}

Solution
Add C-mode declaration guard to the not/compl branch in simplifyCAlternativeTokens() and extend both guards to cover last-parameter position.

@sonarqubecloud
Copy link
Copy Markdown

@chrchr-github chrchr-github changed the title Fix syntaxError when not/compl is used as identifiers (C) Fix #14629 syntaxError when not/compl is used as identifiers (C) Mar 30, 2026
@chrchr-github
Copy link
Copy Markdown
Collaborator

Thanks for your contribution. If you'd like, you can add yourself to the AUTHORS file.

@danmar danmar merged commit 9c1e757 into danmar:main Apr 9, 2026
72 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants