[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] Why memcpy is imported ?
From: |
Jens Nyberg |
Subject: |
Re: [Tinycc-devel] Why memcpy is imported ? |
Date: |
Fri, 21 Feb 2014 15:27:42 +0100 |
Den 21 feb 2014 14:47 skrev "Carlos Montiers" <address@hidden>:
>
> Thanks.
> Is possible pass the value of the structure without call to mempcy?
>
No, if you think about it a structure is like a tiny buffer. The only way to copy that is by using memcpy. This is why memcpy and memset needs be implemented by the compiler. I also dislike this but there is not much you can do about it because it is part of the C standard to be able to copy structs like that.
>
> Carlos.
>
>
> 2014-02-21 6:48 GMT-03:00 Daniel Glöckner <address@hidden>:
>
>> On Fri, Feb 21, 2014 at 04:06:12AM -0300, Carlos Montiers wrote:
>> > with calling to SetConsoleCursorPosition a import for memcpy of
>> > msvcrt.dll is created, without SetConsoleCursorPosition the memcpy import
>> > is not there.
>> >
>> > Why memcpy is imported if I not use it in the code?
>>
>> Because you pass a structure by value.
>>
>> Daniel
>>
>> _______________________________________________
>> Tinycc-devel mailing list
>> address@hidden
>> https://lists.nongnu.org/mailman/listinfo/tinycc-devel
>
>
>
> _______________________________________________
> Tinycc-devel mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel
>