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: Strange error from gcc


eddyq <Eddy@Quicksall.com> writes:

> I'm getting a strange error from gcc.
>
> My try2.c file is as follows:
> #include <stdio.h>
> int main(void);
> int main(void)
> {
>    printf("test\n");
> }
>
> The output is as follows:
> bash-3.00$ gcc try2.c
> /tmp/ccwboFoy.s: Assembler messages:
> /tmp/ccwboFoy.s:12: Error: suffix or operands invalid for `push'
> /tmp/ccwboFoy.s:16: Error: suffix or operands invalid for `push'
> /tmp/ccwboFoy.s:21: Error: suffix or operands invalid for `pop'
>
> Does anyone know what is going on?

You are mixing a compiler which defaults to 64-bit mode with an
assembler which defaults to 32-bit mode, or vice-versa.

Ian


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