[Top][All Lists]

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

Re: [lwip-users] lwip has errors with linker optimization enabled

From: Sergey A. Borshch
Subject: Re: [lwip-users] lwip has errors with linker optimization enabled
Date: Fri, 18 Jan 2019 19:00:16 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1

On 18.01.2019 8:59, star keeper wrote:
But in my opinion this is also a bad coding habit and can easily be fixed by giving the constants different values.
No, It's not a bad practice, it's an IAR violation to C language standard, see 6.5.9 Equality operators:

Two pointers compare equal if and only if both are null pointers, *both are pointers to the same object* (including a pointer to an object and a subobject at its beginning) or function, both are pointers to one past the last element of the same array object, or one is a pointer to one past the end of one array object and the other is a pointer to the start of a different array object that happens to immediately follow the first array object in the address space.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]