Drop fastcall attribute on variadic function#2975
Closed
lwhsu wants to merge 3 commits intophp:masterfrom
Closed
Conversation
Eliminate "fastcall calling convention ignored on variadic function" warning when compiling on 32-bits system with clang
Member
|
I believe we should just drop the FASTCALL for this function entirely. Fastcall (as a callee-clean calling convention) just doesn't make sense for variadics. Other compilers are probably silently falling back to cdecl as well. E.g. GCC says "If the number of arguments is variable all arguments are pushed on the stack" in the fastcall documentation. |
Contributor
Author
|
@nikic: That makes sense. I updated the patch. Do you want me to update the PR title and squash the commits? |
nikic
reviewed
Dec 13, 2017
| ZEND_API void ZEND_FASTCALL zend_hash_apply(HashTable *ht, apply_func_t apply_func); | ||
| ZEND_API void ZEND_FASTCALL zend_hash_apply_with_argument(HashTable *ht, apply_func_arg_t apply_func, void *); | ||
| ZEND_API void ZEND_FASTCALL zend_hash_apply_with_arguments(HashTable *ht, apply_func_args_t apply_func, int, ...); | ||
| ZEND_API void zend_hash_apply_with_arguments(HashTable *ht, apply_func_args_t apply_func, int, ...); |
Member
There was a problem hiding this comment.
This also has to be changed in the zend_hash.c file, which still has the fastcall declaration.
Contributor
Author
Member
|
Merged as 72ec23d, thanks! |
cmb69
added a commit
to cmb69/php-src
that referenced
this pull request
Aug 13, 2024
This is unlikely to be properly supported by compilers anyway, see <php#2975>.
cmb69
added a commit
that referenced
this pull request
Aug 13, 2024
This is unlikely to be properly supported by compilers anyway, see <#2975>.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Eliminate "fastcall calling convention ignored on variadic function"
warning when compiling on 32-bits system with clang