Tool News
 
 
 

Tool News

Products Info
Downloads
Tools FAQs
MESC TOOL NEWS: MESCT-NC30WA_1-981001D

NC30WA, NC30
NC77WA, NC77
NC79WA, NC79
Precautions

Please take note of the following problem in using C compilers NC30WA and NC30 for the M16C/60 series, NC77WA and NC77 for the 77XX series, and NC79WA and NC79 for the 7900 series of microcomputers. You are kindly requested to circumvent this problem by the workaround described below.
This problem, however, has already been eliminated in NC30WA V.3.00 Release 1 and later, NC77WA V.5.00 Release 1, and NC79WA V.3.00 Release 1.


Problem: Expressions may not correctly be evaluated using conditionally compile statement "#if".
  1. Versions Concerned
    Product NameVersions Concerned
    NC30WA, NC30V.1.00 Release 1 to V.2.00 Release 1
    NC77WA, NC77V.3.00 Release 1 to V.4.00 Release 1
    NC79WA, NC79V.2.00 Release 1 to V.2.00 Release 2

  2. Description
    When two constants in a constant expression are compared in conditionally compile statement "#if" or "#if . . . defined", the expression may not correctly be evaluated if a zero is included within one of the constants.

  3. Conditions
    This problem occurs if the following two conditions are satisfied:
    1. A constant expression is evaluated in a "#if" or "#if . . . defined" statement.
    2. One of the constants in the expression includes a zero after its second numeral.

  4. Phenomena
    The constant including a zero cannot correctly be recognized in the constant expression.

  5. Example
    [C Source File]
    -----------------------------------------------------------------------
    
        #define D1    512
        #define D2    4096
    
        #if D1 < D2
          #define MES  "TYPE D1"
        #else
          #define MES  "TYPE D2"
        #endif
    
        main()
        {
                func(MES);         /* Character string "TYPE D2" is passed */
        }
    
    -----------------------------------------------------------------------
    
  6. Workaround
    Please use the "if" or "switch" statement in place of "#if" since this problem occurs only when a constant expression is evaluated by preprocessor command "#if" or #if . . . defined".




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