This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
For GCC, I've found it necessary to have a way to name local (that is, namespace-scope 'static') variables and functions which allows more than one such symbol to be present and have distinct mangled names.
What I currently have implemented is
<unqualified-name> ::= <operator-name> ::= <ctor-dtor-name> ::= <source-name> ::= <local-source-name> // new
<local-source-name> ::= L <number> _ <source-name> // new
It's distinguishable from the other possibilies, because operator-name starts with a lowercase letter, ctor-dtor-name starts with 'C' or 'D', and source-name starts with a digit. There is no semantic meaning attached to the number in a local-source-name, it exists only to keep different names distinct (so it is not like <discriminator> in a local-name).
-- Mark Mitchell CodeSourcery mark@codesourcery.com (650) 331-3385 x713
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |