#pragma map

Description

The #pragma map directive tells the compiler that all references to an identifier are to be converted to "name".

Syntax

The follow list describes the options available for #pragma map:

identifier A name of a data object or a nonoverloaded function with external linkage.

If the identifier is the name of an overloaded function or a member function, there is a risk that the pragma will override the compiler-generated names. This will create problems during linking.

function_signature A name of a function or operator with internal linkage. The name can be qualified.
name The external name that is to be bound to the given object, function, or operator.

You should not use #pragma map to map the following:

The directive can appear anywhere in the program. The identifiers appearing in the directive, including any type names used in the prototype argument list, are resolved as though the directive had appeared at file scope, independent of its actual point of occurrence.

For example,

int func(int);

class X {
public:
	void func(void);
#pragma map(func, "funcname1")	// maps ::func to funcname1
#pragma map(X::func, "funcname2")	// maps X::func to funcname2
};


Preprocessor Directives - An Overview
Preprocessor Directive - #pragma