Why does GCC allow '$' character in variable and function names?

Andrew Haley aph@redhat.com
Wed Oct 18 16:13:00 GMT 2006


Ian Lance Taylor writes:
 > gcc permits '$' as an implementation defined character.  It does this
 > mainly for historical reasons.

We also need it to link C++ programs with programs written in the Java
language.  That's because in Java, classes have synthetic fields whose
names contain '$' chracaters.

Andrew.



More information about the Gcc mailing list