Bug #75677 [NEW]: Clang ignores fastcall calling convention on variadic function
| From: | lwhsu at lwhsu dot org | Date: | Wed, 13 Dec 2017 19:14:40 +0000 |
| Subject: | Bug #75677 [NEW]: Clang ignores fastcall calling convention on variadic function | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-213085@lists.php.net to get a copy of this message | ||
From: lwhsu at lwhsu dot org
Operating system: Ubuntu/FreeBSD
PHP version: master-Git-2017-12-13 (Git)
Package: Compile Warning
Bug Type: Bug
Bug description:Clang ignores fastcall calling convention on variadic function
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 bug report at https://bugs.php.net/bug.php?id=75677&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75677&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75677&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75677&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=75677&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=75677&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=75677&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=75677&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=75677&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=75677&r=support
Expected behavior: https://bugs.php.net/fix.php?id=75677&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=75677&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=75677&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=75677&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75677&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=75677&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=75677&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=75677&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=75677&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=75677&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=75677&r=mysqlcfg