This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
expected '=', ',', ';', 'asm' or '__attribute__' before 'foo'
- From: Georg-Johann Lay <avr at gjlay dot de>
- To: gcc at gcc dot gnu dot org
- Date: Sun, 29 Jan 2012 22:30:28 +0100
- Subject: expected '=', ',', ';', 'asm' or '__attribute__' before 'foo'
Hi,
may I propose to change this message to a more user-friendly one?
In most cases, the message is triggered by a typo like here:
Int foo (void)
{
return 1;
}
A message like
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'foo'
is just pain to the eyes, and apart from that it is not more helpful
than a simple "syntax error before 'foo':
In many cases -- like above -- the user neither wants a = nor a , nor a
; nor asm nor __attribute__.
Maybe a message like "'Int' before 'foo' is not legitimate here" is more
appropriate and eye-friendly?.
English speakers will surely find something more pleasant, but IMHO
almost anything will be better than expected '=', ',', ';', 'asm' or
'__attribute__'
Regards, Johann