[C-safe-secure-studygroup] Homework - rule 13.1

Fulvio Baccaglini fbaccaglini at perforce.com
Mon Oct 29 10:49:19 GMT 2018


Re: "If one wanted a more permissive version of this rule something like ‘An initializer list with side effects shall leave the program in the same state, under all permitted orders of application of the side effects’ – but this is a far harder property to evaluate."

My personal preference at the moment would be to keep the rule as is, and not have side effects in initialisers .

If we were instead to go for this more permissive version, then I think that the same criteria described in the amplification of Rule 13.2 could be used, to make Rule 13.1 and 13.2 consistent with each other.

Looking at Rule 13.1 examples, the permissive version would make the first one compliant:

~~~~~~~~>
volatile u int16_t v1;

void f ( void )
{
    /* Non-compliant  ==>  Compliant */
    uint16_t a[ 2 ] = { v1, 0 };
}
<~~~~~~~~

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.trustable.io/pipermail/c-safe-secure-studygroup/attachments/20181029/106034d3/attachment.html>


More information about the C-safe-secure-studygroup mailing list