Bug 2085

Summary: DCE build process crashes when using compiler flag for C++0x / C++11
Product: dce Reporter: Andreas Lehmann <andreas.lehmann>
Component: otherAssignee: Hajime Tazaki <tazaki>
Status: RESOLVED FIXED    
Severity: normal CC: ns-bugs
Priority: P5    
Version: unspecified   
Hardware: Mac Intel   
OS: Linux   
Attachments: C++0x / C++11 compatible version of the test-stdio.cc

Description Andreas Lehmann 2015-03-31 07:03:12 EDT
Created attachment 2008 [details]
C++0x / C++11 compatible version of the test-stdio.cc

The DCE build process crashes when building the DCE using the C++0x / C++11 version.

Compilerflag was set in the DCE wscript file as
def configure(conf):
    conf.env.append_value('CXXFLAGS', '-std=c++0x')

The compilation crashes at "test-stdio" file "test-stdio.cc" in line 70 and 163 due to error "narrowing conversion from 'int' to 'char' inside".

The problem can easily be fixed by using a "static_cast<>()" to the correct data type.

Fixed test file is attached.
Comment 1 Hajime Tazaki 2015-05-26 06:57:15 EDT
Thanks. Applied.

http://code.nsnam.org/ns-3-dce/rev/e5932a2f38d7