Re: GCC 4.8 libcpp Issue...Possibly Related To (FIXED)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Nov 2, 2013 at 8:28 AM, Jonathan Wakely <jwakely.gcc@xxxxxxxxx> wrote:
> On 27 October 2013 23:36, Cyd Haselton wrote:
>> Android apparently doesn't support implicit conversion so had to do a
>> cast before the argument is passed.
>
> N.B. it's not "Android" that doesn't support conversion from long
> long* to long*, it's C++.

Not sure what N.B. means...

This is probably an obvious question but since I'm still working my
way through C I have to ask:  If C++ does not support that conversion,
why is it in the code?  And does C++ not support implicit conversion
from long long* to long* or explicit, or both?

>
> As I said, the question is why Android's stat::st_size field is not of
> type off_t in the first place.

That is an excellent question and one that I can't answer completely
as I'm still parsing my way through the Android libc source.

I can say that st_size is defined as an unsigned long (which according
to the error is off_t) in one location...and from what I can tell it
seems to be conditional upon a macro definition.  Here's a snippet
from the asm/stat.h

 unsigned long st_size;
*snip*
#define STAT64_HAS_BROKEN_ST_INO 1
*snip*
 long long st_size;

Confusingly, however, it appears to be defined as a long long in every
other stat.h...or kernel_stat.h.  Even MORE confusing, st_size is
defined as an off_t...but, near as I can tell, only for the mips
architecture.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux