Skip to content
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

RE2C version 4 emits warnings #17204

Open
petk opened this issue Dec 17, 2024 · 0 comments
Open

RE2C version 4 emits warnings #17204

petk opened this issue Dec 17, 2024 · 0 comments

Comments

@petk
Copy link
Member

petk commented Dec 17, 2024

Description

The following code:

git clone https://github.com/skvadrik/re2c
cd re2c
git checkout 4.0.2
cmake -B build
cmake --build build -j

cd ../php-src
./buildconf
RE2C=../re2c/build/re2c ./configure
make

Resulted in this output:

ext/pdo/pdo_sql_parser.re:35:1: warning: control flow is undefined for strings that match '\x0', use default rule '*' [-Wundefined-control-flow]
ext/pdo_sqlite/sqlite_sql_parser.re:36:1: warning: control flow is undefined for strings that match '\x0', use default rule '*' [-Wundefined-control-flow]
Zend/zend_language_scanner.l:1816:19: warning: escape has no effect: '\*' [-Wuseless-escape]
Zend/zend_language_scanner.l:1820:19: warning: escape has no effect: '\*' [-Wuseless-escape]
Zend/zend_ini_scanner.l:355:13: warning: escape has no effect: '\.' [-Wuseless-escape]
Zend/zend_ini_scanner.l:355:32: warning: escape has no effect: '\.' [-Wuseless-escape]
Zend/zend_ini_scanner.l:362:32: warning: escape has no effect: '\[' [-Wuseless-escape]
Zend/zend_ini_scanner.l:364:11: warning: escape has no effect: '\[' [-Wuseless-escape]
Zend/zend_ini_scanner.l:661:66: warning: unreachable rule in condition 'ST_OFFSET' (shadowed by rule at line 606) [-Wunreachable-rules]
Zend/zend_ini_scanner.l:661:66: warning: unreachable rule in condition 'ST_SECTION_VALUE' (shadowed by rule at line 606) [-Wunreachable-rules]
...

But I expected output without RE2C specific warnings.

Probably all lexer-related files should be rechecked and updated a bit.

PHP Version

PHP 8.3

Operating System

Any

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant