Problems assembling files

I could not even assemble a simple Hello World program today :(, must be too tired. I kept getting the error

parse error before `(‘
`main’ declared as function returning a function

The answer should of course be to use curly braces { } on lines 3 and 6

Wrong

  1. #include <stdio.h>
  2. int main (void)
  3.    (
  4.        printf ("Hello World!\n");
  5.        return 0;
  6.    )

$ gcc -c -o test2.o test2.c –save-temps
test2.c:4: parse error before `(‘
test2.c:4: `main’ declared as function returning a function

Right

  1. #include <stdio.h>
  2. int main (void)
  3.    {
  4.        printf ("Hello World!\n");
  5.        return 0;
  6.    }

$ gcc -c -o test2.o test2.c –save-temps
$ echo $?
0