Tag Archives: C++14

Contract killing (in Modern C++)

Technical Consultant at Feabhas Ltd
Glennan is an embedded systems and software engineer with over 20 years experience, mostly in high-integrity systems for the defence and aerospace industry.

He specialises in C++, UML, software modelling, Systems Engineering and process development.
Glennan Carnie

If you work in high-integrity or safety-critical software then you have a duty-of-care to:

Ensure your code does what it should
Ensure your code doesn’t do what it’s not supposed to.

Moreover, you’re typically required to both demonstrate and document how you’ve achieved this duty-of-care. Typical mechanisms for demonstrating compliance include unit testing and static analysis; documentation usually includes function specifications and test results. The amount of testing, static analysis and documentation you (have to) do depends on the integrity level of your […]

Posted in C/C++ Programming | Tagged , , , , , , , , , , , , , , | 3 Comments

Brace initialization of user-defined types

Technical Consultant at Feabhas Ltd
Glennan is an embedded systems and software engineer with over 20 years experience, mostly in high-integrity systems for the defence and aerospace industry.

He specialises in C++, UML, software modelling, Systems Engineering and process development.
Glennan Carnie

Uniform initialization syntax is one of my favourite features of Modern C++.  I think it’s important, in good quality code, to clearly distinguish between initialization and assignment.

When it comes to user-defined types – structures and classes – brace initialization can throw up a few unexpected issues, and some counter-intuitive results (and errors!).

In this article, I want to have a look at some of the issues with brace initialization of user-defined types – specifically, brace elision and initializer_lists.

Read on for more…

Like (4)

Posted in C/C++ Programming, General | Tagged , , , , , , , | 1 Comment

“May Not Meet Developer Expectations” #77

Technical Consultant at Feabhas Ltd
Glennan is an embedded systems and software engineer with over 20 years experience, mostly in high-integrity systems for the defence and aerospace industry.

He specialises in C++, UML, software modelling, Systems Engineering and process development.
Glennan Carnie

Question:  Does the following compile?

int func()
{
  int (func);
  return

Posted in C/C++ Programming | Tagged , , , , , | 3 Comments

Exceptional fun!

Technical Consultant at Feabhas Ltd
Glennan is an embedded systems and software engineer with over 20 years experience, mostly in high-integrity systems for the defence and aerospace industry.

He specialises in C++, UML, software modelling, Systems Engineering and process development.
Glennan Carnie

In this article I want to look at some applications for one of C++’s more obscure mechanisms, the function

Posted in C/C++ Programming | Tagged , , , , , , | 3 Comments

The three ‘No’s of sequential consistency

Technical Consultant at Feabhas Ltd
Glennan is an embedded systems and software engineer with over 20 years experience, mostly in high-integrity systems for the defence and aerospace industry.

He specialises in C++, UML, software modelling, Systems Engineering and process development.
Glennan Carnie

In the previous article we looked at the memory consistency problem that occurs when writing multi-threaded code for modern multi-processor systems.

In this article is we’ll have a look at how we can solve the sequential consistency problem and restore some sanity to our programming

Posted in ARM, C/C++ Programming, Cortex | Tagged , , , , , , | Leave a comment