map

C compiler
Read syntax diagramSkip visual syntax diagrammap syntax
 
>>-#--pragma--map--(--name1--,--"--name2--"--)-----------------><
 
C++ compiler
Read syntax diagramSkip visual syntax diagrammap syntax
 
>>-#--pragma--map----------------------------------------------->
 
>--(--name1--+----------------+--,--"--name2--"--)-------------><
             '-(--arg_list--)-'
 

Description

Start of changeConverts all references to an identifier to another, externally defined identifier.End of change

Start of changeParameters

Start of change
name1
The name used in the source code. For C, name1 can represent a data object or function with external linkage. For C++, name1 can represent a data object, a non-overloaded or overloaded function, or overloaded operator, with external linkage. If the name to be mapped is not in the global namespace, it must be fully qualified.

name1 should be declared in the same compilation unit in which it is referenced, but should not be defined in any other compilation unit. name1 must not be used in another #pragma map directive anywhere in the program.

arg_list
The list of arguments for the overloaded function or operator function designated by name1. If name1 designates an overloaded function, the function must be parenthesized and must include its argument list if it exists. If name1 designates a non-overloaded function, only name1 is required, and the parentheses and argument list are optional.
name2
Start of changeThe name that appears in the object code. If name2 exceeds 65535 bytes in length, a message is issued and the pragma is ignored.

name2 can be declared or defined in the same compilation unit in which name1 is referenced. name2 must not be the same as that used in another #pragma map directive in the same compilation unit.

End of change
End of change
End of change

Start of changeNotes on UsageEnd of change

Start of changeThe #pragma map directive can appear anywhere in the program.End of change

Start of change In order for a function to be actually mapped, the map target function (name2) must have a definition available at link time.End of change

Start of changeIf name2 specifies a function name that uses C++ linkage, then name2 must be specified using its mangled name. For example,End of change

Start of changeint foo(int, int);               
#pragma map(foo, "bar__FiT1")
                                    
int main( )                         
{                                   
  return foo(4,5);               
}                                   

int bar(int a, int b)
{                        
  return a+b;            
}                   End of change


[ Top of Page | Previous Page | Next Page | Contents | Index ]