[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] Broken warnings with gcc-3.3-20030127?
From: |
Bernd Trog |
Subject: |
[avr-gcc-list] Broken warnings with gcc-3.3-20030127? |
Date: |
Thu, 20 Feb 2003 01:23:35 -0800 (PST) |
Hi,
I'm trying to inline a function with an asm() statment:
---------------------------------------------------------
#define PORTD 0x12
static inline void
write_byte( unsigned char adr, unsigned char data )
{
asm("out %0, %1" : : "I" (adr), "r" (data));
}
void main(void)
{
unsigned char i;
for( i=0; i < 255;i++) {
write_byte( PORTD, i );
}
}
---------------------------------------------------------
>avr-gcc test.c -Os -Wall -c -g
test.c:6: warning: asm operand 0 probably doesn't match constraints
test.c: In function `write_byte':
test.c:6: warning: asm operand 0 probably doesn't match constraints
IMHO, the asm-code looks fine:
---------------------------------------------------------
ldi r24,lo8(0)
.L7:
out 18, r24
subi r24,lo8(-(1))
cpi r24,lo8(-1)
brne .L7
---------------------------------------------------------
Is this a bug or a feature?
Bernd,
who knows that the rest of the world uses #defines...
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
- [avr-gcc-list] Broken warnings with gcc-3.3-20030127?,
Bernd Trog <=