Skip to content

Fix typedef redefinition warnings #13347

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

Closed
wants to merge 1 commit into from

Conversation

petk
Copy link
Member

@petk petk commented Feb 7, 2024

This is more of a question, since PHP at this point still requires only C99 and this PR fixes warnings "redefinition of typedef '...' is a C11 feature [-Wtypedef-redefinition]" when building with Clang and -Wtypedef-redefinition.

This sounds good for now or should we bump to C11 at some point in the near future?

The issue can be noticed like this:

./buildconf
CC=clang CFLAGS=-Wtypedef-redefinition ./configure 
make

PHP at this point still requires only C99, so this fixes warnings
"redefinition of typedef '...' is a C11 feature [-Wtypedef-redefinition]"
when building with Clang and -Wtypedef-redefinition.
Copy link
Member

@iluuu1994 iluuu1994 left a comment

Choose a reason for hiding this comment

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

Thank you @petk! This looks ok to me for now. I do think bumping to C11 should be reasonable.

@petk
Copy link
Member Author

petk commented Mar 12, 2024

To not cause confusion here, I'll close this one because it only makes cognitive load in the PR queue...

@petk petk closed this Mar 12, 2024
@petk petk deleted the patch-zend-frameless-function branch March 12, 2024 22:19
@iluuu1994
Copy link
Member

@petk Have you decided not to merge this?

@petk
Copy link
Member Author

petk commented Mar 12, 2024

It's like fixing something for only C99 and in C11 it will be ok :D

@iluuu1994
Copy link
Member

iluuu1994 commented Mar 12, 2024

I'll leave it up to you 😊 As long as we're officially supporting C99, it makes sense to avoid warnings there (although it's unlikely someone will actually run into an issue here).

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