[Top][All Lists]

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

Re: [avr-gcc-list] push r1, pop r0

From: Sergey A. Borshch
Subject: Re: [avr-gcc-list] push r1, pop r0
Date: Wed, 8 Nov 2017 11:21:44 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

On 08.11.2017 11:03, David Brown wrote:
(Also, if you are writing C rather
than C++, your function declaration is not correct.)  The sensible way
to write this is:

static inline uint16_t GetStackPointer(void)
        return (SPH << 8) | SPL;
It's not correct declaration too. Function name clearly states that it is returning pointer, so it should return... pointer:
static inline void * GetStackPointer(void)
     return (void *)((SPH << 8) | SPL);

  Sergey A. Borshch            mailto: address@hidden
    SB ELDI ltd. Riga, Latvia

reply via email to

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