This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: OT - Question about error messages


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]