On 2006-03-18, Brian C. Lane <b...@brianlane.com> wrote:
>
> Grant Edwards wrote:
>> I'm trying to figure out how to exit from low power mode.
>> According to the manual, the _BIC_SR_IRQ() macro does what I
>> want, but I can't get it to compile without a warning.  Isn't
>> there a way to do it that doesn't generate compiler warnings?
>> 
>> I don't ship code that wonn't compile without warnings.
>> 
>
> What's the warning look like?

  hdlc.c:159: warning: concatenation of string literals with __FUNCTION__ is 
deprecated

The compiler doesn't like the string concatenation in the asm
statement in iomacros.h:

#define _BIC_SR_IRQ(x)\
    __asm__ __volatile__ (\
        "bic %0, .L__FrameOffset_" __FUNCTION__ "(r1)"\
        : : "i" ((uint16_t)x)\
    )

> I used:
>
> _BIC_SR_IRQ(LPM0_bits);
>
> in my onelock project and don't remember a problem with it.

Are you using gcc 4.x?  With gcc4, the above macro isn't used,
but rather a built-in function that has been added to gcc itself.

-- 
Grant Edwards
gra...@visi.com



Reply via email to