jeudi 5 octobre 2017

Comments in if statement without curly braces

Let's say we have this C code snippet:

if (condition)
    x = a;
else
    x = b;

Is it allowed to insert comments like this, without changing the semantics of the code:

if (condition)
    /* blah blah blah */
    x = a;
else
    x = b;

(if there were curly braces, the answer would be obviously yeas, but what about these cases of if statements without curly braces?)

Aucun commentaire:

Enregistrer un commentaire