Why does GCC allow '$' character in variable and function names?
Sajish V
emailsaju@yahoo.com
Wed Oct 18 04:25:00 GMT 2006
I think that C does not allow special characters ( '~' '!' '@' '#' '$' '%' '^' '&' '*' ) in variable and function names. My knowledge is purely based on the books that I have been reading to learn C.
To verify this when I tried to compile a C program using GCC with '$' in variable names and function names I found that GCC does not complain. No errors or warnings.
I used the basic command with no option to compile.
bash$ gcc <filename>
Can someone please let me know why GCC allows '$' character in variable and function names?
Thanks.
More information about the Gcc
mailing list