URL: <http://savannah.nongnu.org/bugs/?36970>
Summary: FDEV_SETUP_STREAM doesn't work in C++ Project: AVR C Runtime Library Submitted by: wizenedee Submitted on: Thu 26 Jul 2012 09:23:19 PM GMT Category: Library Severity: 3 - Normal Priority: 5 - Normal Item Group: Build system Status: None Percent Complete: 0% Assigned to: None Open/Closed: Open Discussion Lock: Any Release: 1.8.0 Fixed Release: None _______________________________________________________ Details: The FDEV_SETUP_STREAM macro defined in stdio.h only compiles for C99 because it uses designated initializers. The file attached shows a minimal program that shows the problem, adapted from the documentation here: http://www.nongnu.org/avr-libc/user-manual/group__avr__stdio.html#stdio_without_malloc However, when the program is compiled as C++, by giving the file a .cpp extension, the following errors appear: $ avr-gcc fdevopenbug.cpp fdevopenbug.cpp:6:24: sorry, unimplemented: non-trivial designated initializers not supported fdevopenbug.cpp:6:24: sorry, unimplemented: non-trivial designated initializers not supported fdevopenbug.cpp:6:24: sorry, unimplemented: non-trivial designated initializers not supported This bug can be fixed by using a full initialization rather than the designated one. _______________________________________________________ Reply to this item at: <http://savannah.nongnu.org/bugs/?36970> _______________________________________________ Message sent via/by Savannah http://savannah.nongnu.org/ _______________________________________________ AVR-libc-dev mailing list AVR-libc-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/avr-libc-dev