[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] Compiler warning
From: |
David Breeze |
Subject: |
[avr-gcc-list] Compiler warning |
Date: |
Mon, 25 Nov 2002 13:21:22 +0000 |
Can any one help!
The code shown below always gives a compiler warning
Compiling Button.c
Button.c: In function `buttonReadPort':
Button.c:123: warning: asm operand 0 probably doesn't match constraints
I have tried various forms of coersion and no coersion for operand 0, the
result is always the same.
The compiler in use is the winbuild version from AVR Freaks site avr-gcc 3.0.2
dec 14, 2001.
The code produced is what is required, so am I doing something wrong? or is
this a compiler bug?
(Sadly I cannot use the provided macros as they now fall foul of our recently
tightened coding standards).
static __inline__ u8 buttonReadPort(u8 port)
{
u8 result;
__asm__("in %0,%1" : "=r" ((u8)(result)) : "I" (port) );
return result;
}
Thanks in advance
David Breeze
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed. If
an addressing or transmission error has misdirected this e-mail, please notify
the author by replying to this e-mail. If you are not the intended recipient
you must not use, disclose, copy, print or rely on this e-mail.
Joy Mining Machinery Limited/P&H Minepro Services aims to prevent the
propagation of viruses, but cannot guarantee that this email is virus free.
You are advised to scan all attachments and open them at your own risk.
Joy Mining Machinery Limited/P&H Minepro Services may monitor outgoing and
incoming e-mails and other telecommunications on its e-mail and
telecommunication systems.
avr-gcc-list at http://avr1.org
- [avr-gcc-list] Compiler warning,
David Breeze <=