Skip to content

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

Open
wilhelma wants to merge 1 commit intodanmar:mainfrom
cqse:not_as_parameter_name
Open

Fix #14629 syntaxError when not/compl is used as identifiers (C)#8384
wilhelma wants to merge 1 commit intodanmar:mainfrom
cqse:not_as_parameter_name

Conversation

@wilhelma
Copy link
Copy Markdown

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
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.

1 participant