Project

General

Profile

User story #236

Specify C++ version in Linux Makefile

Added by André Neto over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
Start date:
29.09.2015
Due date:
% Done:

0%

Estimated time:
Git branch (link):
Git merge to develop (link):
SVN commit (link/?p=rev):

Description

Task description

Update the Makefiles to specify the version of C++

Context

MISRA C++:2008 is based on C++03 (ISO/IEC 14882:2003)

For GCC, the option is "-std" with the values c++98, c++03, c++11, and c++14 (see https://gcc.gnu.org/onlinedocs/gcc/Standards.html#Standards and https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#C-Dialect-Options), while for CL, there is, apparently, no option.

Warning: The srv03 machine has the GCC 4.4.7-16 version installed, which only has the labels c++98 (meaning ANSI C++) and c++0x (which is meant for experimental C++11 features).

Important: Before GCC 5.1 support for C++11 was experimental. Some features were implemented based on early proposals, and no attempt was made to maintain backward compatibility when they were updated to match the final C++11 standard. [Source: C++0x/C++11 Support in GCC]

Source code files modified

  • MakeDefaults/MakeStdLibDefs.linux

Architecture & design review

Date of the review: 29/09/2015

Person who did the review: André Neto

Version of architecture & design document: N/A. As per the original MARTe implementation, this is a support function and does not require formal design in UML.

Result of review: N/A

List of non-conformities: N/A

Code and documentation review

Date of the review: 26/11/2015 [a529df5]

Person who did the review: Ivan Herrero

Result of review: PASS

List of non-conformities: N/A

Unit test review

Date of the review: 26/11/2015 [a529df5]

Person who did the review: Ivan Herrero

Result of coverage tests review: PASS

Result of functional tests review: PASS

Result of review: PASS

List of non-conformities: N/A

Associated revisions

Revision 253812e1 (diff)
Added by Giuseppe Ferro over 9 years ago

#236 Added -std=c++11 to the CPPFLAGS in MakeStdLibDefs.linux

Revision a529df53 (diff)
Added by Ivan Herrero over 9 years ago

#236 - Add -std=c++98 as default option when compiling C++ source files.

History

#1 Updated by Ivan Herrero over 9 years ago

  • Description updated (diff)

#2 Updated by André Neto over 9 years ago

  • Subject changed from Specify C++ version in Makefile to Specify C++ version in Linux Makefile

#3 Updated by André Neto over 9 years ago

  • Target version changed from 0.6 to 0.7

#4 Updated by André Neto over 9 years ago

  • Target version changed from 0.7 to 0.8

#5 Updated by Giuseppe Ferro over 9 years ago

  • Description updated (diff)
  • Status changed from Code: Impl to Code: Rev

#6 Updated by Ivan Herrero over 9 years ago

  • Description updated (diff)
  • Status changed from Code: Rev to Closed

First version with -std=c++11 done on 253812e, but reverted on 102813a because c++11 is not accepted by the compiler installed on server (GCC 4.4.7).

Second and final attempt done on a529df5 commit using -std=c++98.

Also available in: Atom PDF