[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: OP_CONCAT in lvm.c
- From: Dibyendu Majumdar <mobile@...>
- Date: Sat, 28 Mar 2015 14:42:57 +0000
On 28 March 2015 at 14:23, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:
>> --> rb = b + base;
>>
>> Should the line marked by arrow not be following?
>>
>> rb = base + b
>
> In C, p+n and n+p are the same, even if p is a pointer and n is an int.
>
Right - I checked the C standard and it appears that for addition
either operand may be a pointer - but for subtraction left operand
must be a pointer.
Nevertheless this seems unnecessarily confusing - looking at 5.1
source I see that it was base+b.
Regards