Everything
A.8 Modification of C Source

The language extensions of CC-RX allows its users to create more efficient object files.

Here are two examples describing how to migrate to CC-RX from the other compilers and from CC-RX to the others.

<From other C compiler to the CCRX>

-

#pragma

C source needs to be modified, when C compiler supports the #pragma. Modification methods are examined according to the C compiler specifications.

-

Expanded Specifications

It should be modified when other C compilers are expanding the specifications such as adding keywords etc. Modified methods are examined according to the C compiler specifications.

Note

#pragma is one of the pre-processing directives supported by ANSI. The character string next to #pragma is made to be recognized as directives to C compiler. If that directive does not supported by the compiler, #pragma directive is ignored and the compiler continues the process and ends normally.

<From the CCRX to other C compiler>

-

The CCRX, either deletes key word or divides # fdef in order shift to other C compiler as key word has been added as expanded function.

Example 1.

Disable the keywords

#ifndef __RX

#define __evenaccess /*Change variable with __evenaccess specified to normal variable*/

#endif

Example 2.

Change to other keywords

#ifdef __RX

 _Pragma("inline func")
 #else
 inline

#endif

void func() { }