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: LibrarySeverity: 3 - Normal
Priority: 9 - ImmediateItem Group: Build system
Status: NonePercent Complete: 0%
Assigned to: NoneOpen/Closed: Open
Release: 1.8.0Fixed Release: None

Add a New Comment (Rich MarkupRich 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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 16 Nov 2012 06:10:43 PM UTCarcanumPriority5 - Normal=>9 - Immediate

    Back to the top


    Powered by Savane 3.1-cleanup