This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Unfounded warnings in gcc-3.3
- From: Bernd Trog <berndtrog at yahoo dot com>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 21 Feb 2003 13:10:28 -0800 (PST)
- Subject: Unfounded warnings in gcc-3.3
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
Is there a way to get rid of the warnings other than deleting the
corresponding line in gcc/stmt.c?
Bernd
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/