This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: Question about---error: stray ‘@’ in program
- From: "John (Eljay) Love-Jensen" <eljay at adobe dot com>
- To: David Bausum <davidbausum at gmail dot com>, "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Wed, 28 Oct 2009 08:11:42 -0700
- Subject: RE: Question about---error: stray ‘@’ in program
- References: <6c6489a0910280757m19d7e390y8c3699ca49af30c5@mail.gmail.com>
Hi David,
> I've searched on the net, but I can't find an explanation of what is going on with the above. If you know, please tell me.
On the third line, there are these characters:
A1@B,
The @ character is not a legitimate character for use in an identifier in C.
The legitimate characters are:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
a b c d e f g h i j k l m n o p q r s t u v w x y z
_ 0 1 2 3 4 5 6 7 8 9
(Numbers cannot be used for the initial character.)
With GCC's -fdollars-in-identifiers flag, you can also use:
$
But such use is probably discouraged.
There may be extensions to C which would allow Unicode characters for use in identifiers. If so, it's not an extension I've used.
HTH,
--Eljay