Tool News
 
 
 

Tool News

Products Info
Downloads
Tools FAQs
RENESAS TOOL NEWS on November 16, 2004: RSO-SQMlint_2-041116D

A Note on Using SQMlint
(the MISRA C Rule Checker)

--On a Violation of Rule 60--

Please take note of the following problem in using the SQMlint (the MISRA C rule checker, which extends the functionality of our compilers):
  • On a violation of Rule 60


  1. Versions Concerned
    SQMlint V.1.00 Release 1 and V.1.01 Release 00


  2. Description
    Consider that in an "if-else if-else" construct, the program statement of the second else contains an if statement without an else. Though this does not violate Rule 60 in MISRA C, an error message may appear.

    2.1 Conditions
    This problem occurs if the following conditions are all satisfied:
    (1)There exists an if-else if-else construct.
    (2) The program statement of the second else in (1) is enclosed with braces.
    (3) The program statement in (2) contains an if statement without an else.

    2.2 Example
    -------------------------------------------------------------
    void func(void)
    {
        if( 1 ){                             // Condition (1)
    
        . . . . . . . . . . . . . . . . . . 
    
        } else if( 1 ) {
    
        . . . . . . . . . . . . . . . . . . 
    
        } else {                             // Condition (2)
            if( 1 ){                         // Condition (3)
    
        . . . . . . . . . . . . . . . . . . 
    
            }
        }
    }
    -------------------------------------------------------------
    
    
  3. Workaround
    Neglect the error message appearing under the conditions stated in 2.1.


  4. Schedule of Fixing the Problem
    We plan to fix this problem in our next release of the product.





© 2008. Renesas Technology Corp., All rights reserved. Privacy | Legal