Skip to content

Zend: add nullptr definition if compiler doesn't support C23 - #25440

Open
Girgias wants to merge 1 commit into
php:masterfrom
Girgias:2026-11-portability-nullptr
Open

Girgias wants to merge 1 commit into
php:masterfrom
Girgias:2026-11-portability-nullptr

Conversation

@Girgias

@Girgias Girgias commented Nov 13, 2026

Copy link
Copy Markdown
Member

No description provided.

@TimWolla

Copy link
Copy Markdown
Member

Why? The biggest benefit of nullptr is that it's of nullptr_t. You cannot emulate that as far as I can tell. So replacing NULL by nullptr right now does not seem useful (particularly since NULL is likely going to be defined as nullptr for C23).

@Girgias

Girgias commented Nov 13, 2026

Copy link
Copy Markdown
Member Author

I was thinking of migrating usages of NULL to nullptr so that on a C23 compiler it would warn if it is used as a parameter for functions expecting an integer type.

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