Bug 2085 - DCE build process crashes when using compiler flag for C++0x / C++11
DCE build process crashes when using compiler flag for C++0x / C++11
Status: RESOLVED FIXED
Product: dce
Classification: Unclassified
Component: other
unspecified
Mac Intel Linux
: P5 normal
Assigned To: Hajime Tazaki
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-03-31 07:03 EDT by Andreas Lehmann
Modified: 2015-05-26 06:57 EDT (History)
1 user (show)

See Also:


Attachments
C++0x / C++11 compatible version of the test-stdio.cc (8.67 KB, text/x-csrc)
2015-03-31 07:03 EDT, Andreas Lehmann
Details

Note You need to log in before you can comment on or make changes to this bug.
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