The GCC compiler complains my code:
error: expected expression before ‘,’ token
I go to that line and do not see such token. I am using vim.
Is there a way to find out this?
The message it's trying to display is:
error: expected expression before ',' token
The compiler is running in an environment where it's been told it can
use the UTF-8 encoding for Unicode characters. UTF-8 is identical to
ASCII for many common characters, but for characters that can't be
represented in 7-bit ASCII it uses a multi-byte encoding. In this
case, it's printing the encoding for an opening single quote, followed
by a comma, followed by the encoding for a closing single quote.
(ASCII has the apostrophe and backtick characters, but not opening and
closing single quotes).
If you can control the locale under which gcc runs, you can get it to
use ASCII apostrophes, but you've indicated that that's not feasible.
If the error message is saved to a log file, and if you have the
"iconv" command on your system, you might be able to translate it
to something legible.
Or you can just ignore the funny characters and realize that gcc is
simply referring to a ',' (comma) token. You almost certainly have a
comma character on the specified line, and a syntax error on or just
before that line.
Syntax error messages can be obscure; typically the compiler tries to
guess what *should* be there, but C's syntax is sufficiently "dense"
that its guess is very often wrong. With some practice, just knowing
that there's a syntax error should be enough to let you find the
problem. If you can't figure it out, post your source (copy-and-paste
it, don't re-type it) and we can help.