Tool News
 
 
 

Tool News

Products Info
Downloads
Tools FAQs
MESC TOOL NEWS: MESCT-NC308WA_2-991001D

NC308WA and NC30WA
Precautions

Please take note of the following problem in using C compilers (with assembler and integrated development environment) NC308WA for the M16C/80 series and NC30WA for the M16C/60 and 20 series of microcomputers.


  1. Versions Concerned
    NC308WA V.1.00 Release 1
    NC30WA V.2.00 Release 1 -- V.3.10 Release 1


  2. Problem
    When a conditional branch statement including a return statement with no return value is described in a function with a return value, exceptions may occur at compilation, which results in the compiler being forcedly terminated.


  3. Conditions
    This problem occurs if the following three conditions are satisfied:
    (1)A conditional branch statement is described in a function where a return value is defined
    (2)If the condition of the branch is true, only a return statement that returns a value is executed.
    (3)If the condition of the branch is false, a statement that assigns a constant and a return statement that returns no value (or the ending portion of the function with no return statement) are executed.
         [Example]
          ----------------------------------------------------------------------
         |    char x;
         |
         |    char func(void)
         |    {
         |        if (x)            (1)
         |            return 1;     (2)
         |        x = 1;            (3)
         |    }                     (3)
          ----------------------------------------------------------------------
    
  4. Workaround
    Ensure that a return value is described within a return statement in a function that returns a value. Also, explicitly describe a return statement that returns a value, at the end of the function.






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