Am 06.09.2002 17:21:54, schrieb Paul Burke <p...@scazon.com>: >I have just had a little problem when outputting strings. > >If a string has 2 or more commas in it, the compiler gets upset. For >example: > > puts("O for a muse of fire, that would ascend\r\n"); > puts("The brightest Heaven of invention\r\n"); > puts("A kingdom for a stage, princes to act,\r\n"); > puts("And monarchs to behold the swelling scene\r\n\r\n"); > >Line 1 is fine. Line 3 causes "internal error: unsupported location >error", but if I remove either of the commas it too is OK. > >Is this normal for GCC, and if so, why?
no thats not normal: if i compile this: #include <stdlib.h> int main() { char buf[80]; snprintf(buf, 80, "hello, coma\n"); snprintf(buf, 80, "hello, coma,\n"); snprintf(buf, 80, "A kingdom for a stage, princes to act,\r\n"); } with "msp430-gcc -mmcu=msp430x1121 tt.c" i don't get any warning or error. you problem is probably related to the definition of "puts". is it a macro or function? are you using a recent msp430-gcc version? chris