|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75677 Clang ignores fastcall calling convention on variadic function
Submitted: 2017-12-13 19:14 UTC Modified: -
From: lwhsu at lwhsu dot org Assigned:
Status: Closed Package: Compile Warning
PHP Version: master-Git-2017-12-13 (Git) OS: Ubuntu/FreeBSD
Private report: No CVE-ID: None
 [2017-12-13 19:14 UTC] lwhsu at lwhsu dot org
On a 32-bit system compile a php embedded program with clang will result warning or error like this:

In file included from a.c:1:
In file included from /usr/include/php/20160303/main/php.h:36:
In file included from /usr/include/php/20160303/Zend/zend.h:36:
/usr/include/php/20160303/Zend/zend_hash.h:141:15: error: fastcall calling convention ignored on
      variadic function [-Werror,-Wignored-attributes]
ZEND_API void ZEND_FASTCALL 2(HashTable *ht, apply_func_args_t app...
/usr/include/php/20160303/Zend/zend_portability.h:239:39: note: expanded from macro 'ZEND_FASTCALL'
# define ZEND_FASTCALL __attribute__((fastcall))
1 error generated.

This causes configuring some programs embed php failing.  It would be great if we can make ZEND_FASTCALL on this function conditional by compiler type.

Test script:
/* compile with clang on a 32-bit system */
#include <php.h>
#include <php_main.h>

int main() {
        return 0;


Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-12-15 20:56 UTC]
Automatic comment on behalf of
Log: Fix bug #75677: Drop fastcall attribute on variadic function
 [2017-12-15 20:56 UTC]
-Status: Open +Status: Closed
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jul 19 04:01:28 2024 UTC