Sarvavyapi
Sarvavyapi

Reputation: 850

What does $$ in this C statement mean

What is the semantic of $$ in the below statement?

extern UINT32 Load$$ER_RAM_RO$$Base;

There is an xml file which is used by the linker that contains the definition as shown below:

<GlobalVariable Name="Image$$ER_RAM_RO$$Base" Value="ADDR(STACK_TOP) + 8"/>

Upvotes: 2

Views: 1673

Answers (1)

Jon Purdy
Jon Purdy

Reputation: 55039

It’s an identifier character, just like alphanumeric characters and underscores. Allowing $ in identifiers is a GNU extension to C and C++. You can enable it explicitly with the -fdollars-in-identifiers flag. Here it seems to be used in a naming convention where $$ separates namespace components.

Upvotes: 5

Related Questions