Bug #75677 [Opn->Csd]: Clang ignores fastcall calling convention on variadic function
Edit report at https://bugs.php.net/bug.php?id=75677&edit=1
ID: 75677
Updated by: nikic@php.net
Reported by: lwhsu at lwhsu dot org
Summary: Clang ignores fastcall calling convention on
variadic function
-Status: Open
+Status: Closed
Type: Bug
Package: Compile Warning
Operating System: Ubuntu/FreeBSD
PHP Version: master-Git-2017-12-13 (Git)
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of lwhsu@lwhsu.org
Revision: http://git.php.net/?p=php-src.git;a=commit;h=72ec23d8233ac9a2071f991752cff55febb167d5
Log: Fix bug #75677: Drop fastcall attribute on variadic function
Previous Comments:
------------------------------------------------------------------------
[2017-12-13 19:14:38] lwhsu at lwhsu dot org
Description:
------------
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() {
php_request_startup();
return 0;
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75677&edit=1
Thread (2 messages)