Everything

-lang


< Compile Options / Source Options >

[Format]

-lang= { c | cpp | ecpp | c99 }

 

-

[Default]

If this option is not specified, the compiler will compile the program file as a C++ source file when the extension is cpp, cc, or cp, and as a C (C89) source file for any other extensions. However, if the extension is src or s, the program file is handled as an assembly-language file regardless of whether this option is specified.

[Description]

-

This option specifies the language of the source file.

-

When the lang=c option is specified, the compiler will compile the program file as a C (C89) source file.

-

When the lang=cpp option is specified, the compiler will compile the program file as a C++ source file.

-

When the lang=ecpp option is specified, the compiler will compile the program file as an Embedded C++ source file.

-

When the lang=c99 option is specified, the compiler will compile the program file as a C (C99) source file.

[Remarks]

-

The Embedded C++ language specification does not support a catch, const_cast, dynamic_cast, explicit, mutable, namespace, reinterpret_cast, static_cast, template, throw, try, typeid, typename, using, multiple inheritance, or virtual base class. If one of these classes is written in the source file, the compiler will display an error message.

-

Always specify the lang=ecpp option when using an EC++ library.

-

In batch compilation (when multiple C/C++ language source files are input to the compiler at the same time), the individual C or C++ language source files must be in the same language. Thus, separate the C and C++ language source files in accord with the languages to be specified and then perform batch compilation by specifying this option for the group in each of the languages.