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

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

 



On 2 November 2013 13:20, Jonathan Wakely wrote:
> On 28 October 2013 18:22, Cyd Haselton <chaselton@xxxxxxxxx> wrote:
>> On Sun, Oct 27, 2013 at 6:36 PM, Cyd Haselton <chaselton@xxxxxxxxx> wrote:
>>
>> On Oct 27, 2013 6:36 PM, "Cyd Haselton" <chaselton@xxxxxxxxx> wrote:
>>>
>>> Android apparently doesn't support implicit conversion so had to do a
>>> cast before the argument is passed.
>>>
>>> I added
>>>
>>> off_t ot = (off_t) &file->st.st_size;
>>>
>>> before _cpp_convert_input, and passed &ot to argument 7 in _cpp_convert_input.
>>>
>>
>> UPDATE: The above modification allowed the build to complete but results in a
>> bad address error when resulting binaries are run on device.
>> Will revise and try again...and email gcc-bugs if necessary.
>
> Not surprising, that modification is utterly broken.  You're casting
> the address of st_size to an off_t, when you should be using it's
> value, not its address.
>
> You could try:
>
> off_t ot = file->st.st_size;
> Then pass &ot into the function and then:
> file->st.st_size; = ot;

Without the first semi-colon in the line above, that was a copy'n'paste error.

>
> But I have to wonder why Android's struct stat has the wrong type for
> the st_size member, is it not meant to be a POSIX conforming library?




[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