avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-libc-dev] [bug #36970] FDEV_SETUP_STREAM doesn't work in C++


From: Adam Dunlap
Subject: [avr-libc-dev] [bug #36970] FDEV_SETUP_STREAM doesn't work in C++
Date: Thu, 26 Jul 2012 21:23:19 +0000
User-agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11

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/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]