"Daniel Otte" <[email protected]> writes: > It seems that the preprocessor of gas doesn't handle the UL suffix correct. > > #define UBRR_VALUE ((((F_CPU) + (8 * (BAUD)))/ (16 * (BAUD))) -1) > > works, while > > #define UBRR_VALUE ((((F_CPU) + (8UL * (BAUD))) /(16UL * (BAUD))) -1UL) > > yields a lot of " Error: missing ')'" messages. > > can anyone verify that?
Yes. indeed, the error message is triggered by the 'UL'. The simple assembler line .equ test, (34UL) gives (among others) ./added/fastload.h: Assembler messages: ./added/fastload.h:203: Error: missing ')' > Should I file a bug report for gas? No. While you can use the C preprocessor with gas, you cannot use C constructs with gas. 34UL is not a valid gas constant, since gas doesn't know anything about things like 'unsigned long' (and it would have no meaning whatsoever in it). This #define is meant for use with C and only expands to something meaningful when used in C. The error messages you've got are somewhat misleading, however. My above test line gave after the part cited above: ./added/fastload.h:203: Error: junk at end of line, first unrecognized character is `U' which points to the problem. Heike _______________________________________________ AVR-chat mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/avr-chat
