
parrisimo at gmail
Jul 4, 2012, 7:50 AM
Post #3 of 5
(356 views)
Permalink
|
|
Re: Should llabs() be used instead of abs() for long long int?
[In reply to]
|
|
Thanks, Gary, for the reply. Do you think the project would accept a patch to change from abs to llabs? Are there benefits of using abs that couldn't be achieved with llabs? On Wed, Jul 4, 2012 at 9:32 AM, Gary Buhrmaster <gary.buhrmaster [at] gmail>wrote: > On Wed, Jul 4, 2012 at 4:51 AM, Matthew Parris <parrisimo [at] gmail> > wrote: > > I ran into a compile error on my QNAP NAS with Marvell 6282 1.6GHz (ARM) > and > > kernel 2.6.33.2: > > > > transcode.cpp:541: error: call of overloaded 'abs(long long int)' is > > ambiguous > > My recollection is that a long long abs was officially added to the > specification in c++11 (to go along with an int abs, and a long abs). > > > When I edited the code and changed from abs to llabs, the compile was > > successful. Is this a particular for my system or would other systems > > benefit from this change? > > Your (and when I say your, I mean any particular distro or cross > compiler) compiler/header/libraries will vary as to when they > supported a long long abs (various backports, various compiler > c++ standards defaults, etc.) I am not at all surprised that an ARM > port has some differences than the standard x86 variants. > > Gary > _______________________________________________ > mythtv-dev mailing list > mythtv-dev [at] mythtv > http://www.mythtv.org/mailman/listinfo/mythtv-dev >
|