Features of the HCS12 C++ compiler?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Features of the HCS12 C++ compiler?

4,496 次查看
michaelh
Contributor I
I'm interested in using the C++ compiler in the HCS12 version of CodeWarrior. Could anyone point me at a copy of the manual? The website and special editon both stop at the C compiler manual.

I've asked support but they're a bit busy at the moment. I'm interested in the level of support, such as:

* Is it just Embedded C++?
* Does it have namespaces?
* Does it have templates?
* Does it have the new style cast operators such as static_cast?
* Does it have multiple inheritance?

Namespaces make the code more maintainable. New style casts make the language more specific and therefore safer. Templates, in moderation, can get rid of a lot of unsafe casts.
标签 (1)
标记 (1)
0 项奖励
回复
6 回复数

799 次查看
BlackNight
NXP Employee
NXP Employee

Hello,
not sure why this part is missing in the latest version. I have attached to this message a previous version which shall answer your questions.

Erich

 

Manual_Compiler_HC12.zip

Message Edited by t.dowe on 2009-10-22 10:00 AM
0 项奖励
回复

799 次查看
michaelh
Contributor I
Thanks Erich. It talks about EC++ and cC++. EC++ doesn't seem to be Embedded C++ but an even stricter subset. cC++ is much more usable.

For anybody reading this, the answers according to the 2004 edition of the manual are:

* Is it just Embedded C++? No - has an option for more features.
* Does it have namespaces? No
* Does it have templates? Yes in cC++ mode.
* Does it have the new style cast operators such as static_cast? No
* Does it have multiple inheritance? Yes in cC++ mode.

Erich, do you know if any of these features have been added in the latest release? I'm quite keen on namespaces and the new style casts have no runtime overhead.
0 项奖励
回复

799 次查看
Lundin
Senior Contributor IV
It is rather comical, really. When you pick the compiler option C++ you can choose between "Full C++" and "Embedded C++".

Embedded C++ is a stripped version of ANSI/ISO C++.
Full C++ is another stripped version of ANSI/ISO C++, ie a version that isn't full.

Apart from those features mentioned it is also missing, if I remember correctly, the bool type and exception handling.
0 项奖励
回复

799 次查看
wste
Contributor I
Hi,

Lundin, you are right. In 2007, a C++ compiler that isn't compliant with ISO 14882 (at least edition 1 of 1998, better ed 2, 2003) is not just lacking certain features.
This is a major software defect.

And don't start to argue, C++ is inefficient for an embedded 16-bit target, as is even stated in the corresponding manual. This might have been 10 years ago, but today, this is bull**bleep**, sorry if that may sound rude...

-wolfi
0 项奖励
回复

799 次查看
BlackNight
NXP Employee
NXP Employee
Hi Michael,
To my knowledge, no new C++ features have been added since a while.

Erich
0 项奖励
回复

799 次查看
wste
Contributor I

Hello,

does this imply, the compiler can't be used to compile (parts of) the Boost libraries (www.boost.org), such as DateTime, Signals, bind, lambda???

These are the day-to-day tools of any serious C++ development!
Without support for these, the C++ compiler would be principally unusable...

Thanks for your help,

-wolfi

0 项奖励
回复