[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] Comma Operator in #define
From: |
Keith Gudger |
Subject: |
[avr-gcc-list] Comma Operator in #define |
Date: |
Tue, 22 Jul 2003 14:15:36 -0700 (PDT) |
Maybe I'm missing something, but I *did* check the ANSI C manual, and this
should be OK, I think.
I want to use a comma operator in a macro (#define) statement:
#define set_clock(x) asm volatile("nop\n\t"::), (PORTB |= BIT3)
avr-gcc gives the following error when I use this macro:
set_clock();
error: parse error before ',' token
If I just make it a ';', then everything works OK.
Any ideas? What am I doing wrong? Or is this a bug?
Keith
- [avr-gcc-list] Comma Operator in #define,
Keith Gudger <=