|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70340 use of abs() instead of llabs() for long long
Submitted: 2015-08-24 12:12 UTC Modified: 2020-04-16 12:49 UTC
Avg. Score:2.8 ± 1.1
Reproduced:3 of 3 (100.0%)
Same Version:1 (33.3%)
Same OS:2 (66.7%)
From: andreas at fink dot org Assigned: derick (profile)
Status: Closed Package: Compile Warning
PHP Version: 7.0.0RC1 OS: OS X 10.11
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: andreas at fink dot org
New email:
PHP Version: OS:


 [2015-08-24 12:12 UTC] andreas at fink dot org
While compiling under OS X, the compiler warns us about a probably unwanted type conversion:

php-7.0.0RC1/ext/date/php_date.c:2196:6: warning: absolute value function 'abs' given an argument of type
      'long long' but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value]
                                        abs(utc_offset / 60),
php-7.0.0RC1/ext/date/php_date.c:2196:6: note: use function 'llabs' instead
                                        abs(utc_offset / 60),

given input is long long, we probably want output to be long long too or we might have a year 2038 problem (

Test script:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-08-24 13:12 UTC]
-Assigned To: +Assigned To: ab
 [2015-08-24 13:19 UTC]
-Assigned To: ab +Assigned To: derick
 [2015-08-24 13:31 UTC]
Yeah, that was seen actually in the build logs all the time. But not critical IMHO in first place as the TZ offset can't grow that much. Still the warning should be probably fixed.

 [2020-04-16 12:49 UTC]
-Status: Assigned +Status: Closed
 [2020-04-16 12:49 UTC]
This has been fixed in the meantime.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jul 22 20:01:29 2024 UTC