Uploaded image for project: 'SonarCFamily'
  1. SonarCFamily
  2. CPP-2449

S1751: Add exception for do { ... break; ... } while(0);

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.7
    • Component/s: Rules
    • Labels:
      None

      Description

      Add an exception for:

      do {
        // ...
        break;
        // ...
      } while(0);
      

      which is used to avoid goto statements in favour of break statements. Let's see if after this exception the issue BUG type makes sense.

        Attachments

          Activity

            People

            • Assignee:
              abbas.sabra Abbas Sabra
              Reporter:
              massimo.paladin Massimo PALADIN
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: