This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: OT - Question about error messages
- From: Brian Dessent <brian at dessent dot net>
- To: Michael Sullivan <michael at espersunited dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Sun, 11 Nov 2007 10:04:25 -0800
- Subject: Re: OT - Question about error messages
- References: <1194803462.17205.45.camel@camille.espersunited.com>
- Reply-to: gcc-help at gcc dot gnu dot org
Michael Sullivan wrote:
> 12 character createCharacter(char* name, long maxHP, long maxMP)
You're missing a semicolon at the end of this prototype.
> character.c: In function 'createCharacter':
> character.c:8: error: expected '=', ',', ';', 'asm' or '__attribute__'
> before '{' token
> character.c:15: error: expected '=', ',', ';', 'asm' or '__attribute__'
> before '{' token
> character.c:27: error: expected '=', ',', ';', 'asm' or '__attribute__'
> before '{' token
> character.c:63: error: expected '=', ',', ';', 'asm' or '__attribute__'
> before '{' token
> character.c:74: error: old-style parameter declarations in prototyped
> function definition
> character.c:74: error: expected '{' at end of input
> make: *** [character] Error 1
>
> I have no idea what those errors mean. Can anyone help me, or else
> direct me to a website that provides explanations for what gcc error
> messages mean? Thank you.
The error is a little cryptic because the input after preprocessing is
quite nonsensical without that semicolon, since a function body is
expected.
Brian