Embedded C++

Programming language


title: "Embedded C++" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["c++-programming-language-family", "class-based-programming-languages", "hardware-description-languages", "embedded-systems"] description: "Programming language" topic_path: "linguistics" source: "https://en.wikipedia.org/wiki/Embedded_C++" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0

::summary Programming language ::

Embedded C++ (EC++) is a dialect of the C++ programming language for embedded systems. It was defined by an industry group led by major Japanese central processing unit (CPU) manufacturers, including NEC, Hitachi, Fujitsu, and Toshiba, to address the shortcomings of C++ for embedded applications. The goal of the effort is to preserve the most useful object-oriented features of the C++ language yet minimize code size while maximizing execution efficiency and making compiler construction simpler. The official website states the goal as "to provide embedded systems programmers with a subset of C++ that is easy for the average C programmer to understand and use".

Differences from C++

Embedded C++ excludes some features of C++.

::data[format=table] | Feature | ISO/ANSI C C++ | Embedded C++ | scope="row" | Exception handling | scope="row" | Multiple inheritance | scope="row" | mutable, a storage class specifier | scope="row" | Namespaces | scope="row" | Templates | scope="row" | Run-time type information (typeid) | scope="row" | Style casts (static_cast, dynamic_cast, reinterpret_cast, and const_cast) | scope="row" | Virtual base classes | |---|---|---|---|---|---|---|---|---|---|---| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ::

Some compilers, such as those from Green Hills and IAR Systems, allow certain features of ISO/ANSI C++ to be enabled in Embedded C++. IAR Systems calls this "Extended Embedded C++".

Compilation

An EC++ program can be compiled with any C++ compiler. But, a compiler specific to EC++ may have an easier time doing optimization.

Compilers specific to EC++ are provided by companies such as:

  • IAR Systems{{cite web | url = http://www.iar.com/ew | title = IAR Systems - Compilers and debuggers | work = IAR Systems website | access-date = 2011-02-21 | archive-date = 2015-01-05 | archive-url = https://web.archive.org/web/20150105073701/http://www.iar.com/ew/ | url-status = dead
  • Freescale Semiconductor, (spin-off from Motorola in 2004 who had acquired Metrowerks in 1999)
  • Tasking Software,{{cite web |url = http://www.tasking.com/resources/technologies/compilers/ecpp |title = Embedded C++ compiler technology |work = Tasking website |url-status = dead |archive-url = https://web.archive.org/web/20090101140055/http://www.tasking.com/resources/technologies/compilers/ecpp/ |archive-date = 2009-01-01
  • Green Hills Software{{cite web |url = http://www.ghs.com/products/optimizingC++EC++Compilers.html |title = Green Hills Optimizing C/C++/EC++ Compilers |work = Green Hills Software website |url-status = dead |archive-url = https://web.archive.org/web/20081025094812/http://www.ghs.com/products/optimizingC++EC++Compilers.html |archive-date = 2008-10-25

Criticism

The language has had a poor reception with many expert C++ programmers. In particular, Bjarne Stroustrup says, "To the best of my knowledge EC++ is dead (2004), and if it isn't it ought to be."{{cite web | url =http://www.stroustrup.com/bs_faq.html#EC++ | title = What do you think of EC++? | work = Bjarne Stroustrup's FAQ | url =http://osxbook.com/book/bonus/ancient/whatismacosx/arch_xnu.html | title =What is Mac OS X? | work =Amit Singh | access-date =2015-03-04 | archive-date =2019-04-19 | archive-url =https://web.archive.org/web/20190419152142/http://osxbook.com/book/bonus/ancient/whatismacosx/arch_xnu.html | url-status =dead | url =https://developer.apple.com/library/mac/documentation/DeviceDrivers/Conceptual/WritingDeviceDriver/CPluPlusRuntime/CPlusPlusRuntime.html#//apple_ref/doc/uid/TP30000695-BAJIBFDE | title = The libkern C++ Runtime | work = IOKit Device Driver Design Guidelines

References

References

  1. "EC++ Rationale".
  2. [http://www.caravan.net/ec2plus/question.html EC++ Questions and Answers]
  3. "Embedded and Extended Embedded C++".

::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::

c++-programming-language-familyclass-based-programming-languageshardware-description-languagesembedded-systems