11.07.2015 Views

MSP430 IAR C/C++ Compiler reference guide - Rice University

MSP430 IAR C/C++ Compiler reference guide - Rice University

MSP430 IAR C/C++ Compiler reference guide - Rice University

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Using <strong>C++</strong><strong>IAR</strong> Systems supports two levels of the <strong>C++</strong> language: The industry-standardEmbedded <strong>C++</strong> and <strong>IAR</strong> Extended Embedded <strong>C++</strong>. They are described in thischapter.OverviewEmbedded <strong>C++</strong> is a subset of the <strong>C++</strong> programming language which is intended forembedded systems programming. It was defined by an industry consortium, theEmbedded <strong>C++</strong> Technical Committee. Performance and portability are particularlyimportant in embedded systems development, which was considered when defining thelanguage.STANDARD EMBEDDED <strong>C++</strong>The following <strong>C++</strong> features are supported:●●●●Classes, which are user-defined types that incorporate both data structure andbehavior; the essential feature of inheritance allows data structure and behavior tobe shared among classesPolymorphism, which means that an operation can behave differently on differentclasses, is provided by virtual functionsOverloading of operators and function names, which allows several operators orfunctions with the same name, provided that there is a sufficient difference in theirargument listsType-safe memory management using the operators new and delete● Inline functions, which are indicated as particularly suitable for inline expansion.<strong>C++</strong> features which have been excluded are those that introduce overhead in executiontime or code size that are beyond the control of the programmer. Also excluded arerecent additions to the ISO/ANSI <strong>C++</strong> standard. This is because they represent potentialportability problems, due to the fact that few development tools support the standard.Embedded <strong>C++</strong> thus offers a subset of <strong>C++</strong> which is efficient and fully supported byexisting development tools.Standard Embedded <strong>C++</strong> lacks the following features of <strong>C++</strong>:●●●TemplatesMultiple and virtual inheritanceException handlingPart 1. Using the compiler 101

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!