Uploaded image for project: 'Rules Repository'
  1. Rules Repository
  2. RSPEC-1914

Track instances of the "#error" preprocessor directive being reached

    Details

    • Type: Finding Detection
    • Status: Active
    • Resolution: Unresolved
    • Labels:
      None
    • Message:
      Review the preprocessor configuration options to not reach this #error directive.
    • Default Severity:
      Info
    • Legacy Key:
      PPErrorDirectiveReached
    • Covered Languages:
      C, C++, Objective-C
    • CPPCheck:
      preprocessorErrorDirective

      Description

      This rule creates a issue whenever an #error preprocessor directive is reached during the project's analysis. In most cases, this indicates that the preprocessor was badly configured. Some predefined macros or library include paths might be required to fix the configuration.

      Noncompliant Code Example

      #error This is an error
      

        Attachments

          Issue Links

          1.
          C-Family RSPEC-4360 Language-Specification Active Unassigned

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                ann.campbell.2 Ann Campbell
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: