Skip to content

Fix -Wuseless-escape warnings emitted by re2c #19050

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 7, 2025

Conversation

petk
Copy link
Member

@petk petk commented Jul 6, 2025

re2c version 4 enabled some warnings by default. This fixes re2c code for the -Wuseless-escape warnings.

There are two same issues reported.
Issue: GH-17523
Closes: GH-17204

I'd suggest to split these issues into more steps to gradually fix all re2c warnings and enabling all warnings with -W flag on master (PHP-8.5) branch.

Can someone perhaps review this one if this is correct?

I've tested this with re2c 1.0.3 and latest re2c version 4. And it seems the output of the generated files is the same before this patch and after.

re2c version 4 enabled some warnings by default. This fixes re2c code
for the `-Wuseless-escape` warnings.

There are two same issues reported.
Issue: phpGH-17523
Closes: phpGH-17204
Copy link
Member

@nielsdos nielsdos left a comment

Choose a reason for hiding this comment

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

Looks good and I agree with your proposed plan

@petk petk merged commit 258fbd6 into php:PHP-8.3 Jul 7, 2025
9 checks passed
@petk petk deleted the patch-re2c-warnings-PHP-8.3 branch July 7, 2025 07:51
petk added a commit that referenced this pull request Jul 7, 2025
* PHP-8.3:
  Fix -Wuseless-escape warnings emitted by re2c (#19050)
petk added a commit that referenced this pull request Jul 7, 2025
* PHP-8.4:
  Fix -Wuseless-escape warnings emitted by re2c (#19050)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants