Skip to content

tree: use alignof/alignas as it is always available - #25017

Merged
Girgias merged 2 commits into
php:masterfrom
Girgias:2026-10-alignof
Nov 3, 2026
Merged

Girgias merged 2 commits into
php:masterfrom
Girgias:2026-10-alignof

Conversation

@Girgias

@Girgias Girgias commented Oct 28, 2026

Copy link
Copy Markdown
Member

As we now require C11

As we now require C11
Sadly we cannot fully remove ZEND_SET_ALIGNED() as alignas is not allowed in typedefs.
@Girgias Girgias changed the title tree: alignof is always available tree: use alignof/alignas as it is always available Oct 29, 2026
@Girgias
Girgias marked this pull request as ready for review October 29, 2026 16:53
Comment thread ext/hash/hash.c
#include "zend_exceptions.h"
#include "zend_interfaces.h"
#include "zend_smart_str.h"
#include <stdalign.h>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we include this in zend_portability.h instead?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It already is included in zend_portability

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can this one then be removed or is it required here for some reason?

@Girgias
Girgias requested a review from arnaud-lb November 2, 2026 11:40

@arnaud-lb arnaud-lb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me!

@Girgias
Girgias merged commit 6c7ddf9 into php:master Nov 3, 2026
18 checks passed
@Girgias
Girgias deleted the 2026-10-alignof branch November 3, 2026 14:08
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.

3 participants