bugAVR C Runtime Library - Bugs: bug #36970, FDEV_SETUP_STREAM doesn't work in...

 
 

bug #36970: FDEV_SETUP_STREAM doesn't work in C++

Submitted by:  Adam Dunlap <wizenedee>
Submitted on:  Thu 26 Jul 2012 09:23:19 PM UTC  
 
Category:  Library Severity:  3 - Normal
Priority:  9 - Immediate Item Group:  Build system
Status:  None Percent Complete:  0%
Assigned to:  None Open/Closed:  Open
Release:  1.8.0 Fixed Release:  None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 26 Jul 2012 09:23:19 PM UTC, original submission:

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.

Adam Dunlap <wizenedee>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by arcanum (Updated the item)
  • -email is unavailable- added by wizenedee (Submitted the item)
  •  

     

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-11-16 arcanum Priority5 - Normal => 9 - Immediate

    Back to the top


    Powered by Savane 3.3