title: Invalid instruction suffix for push when assembling with gas
body: <p>When assembling a file with GNU assembler I get the following error:</p>
  
  <blockquote>
    <p>hello.s:6: Error: invalid instruction suffix for `push'</p>
  </blockquote>
  
  <p>Here's the file that I'm trying to assemble:</p>
  
  <pre><code>        .text
  LC0:
          .ascii "Hello, world!\12\0"
  .globl _main
  _main:
          pushl   %ebp
          movl    %esp, %ebp
          subl    $8, %esp
          andl    $-16, %esp
          movl    $0, %eax
          movl    %eax, -4(%ebp)
          movl    -4(%ebp), %eax
          call    __alloca
          call    ___main
          movl    $LC0, (%esp)
          call    _printf
          movl    $0, %eax
          leave
          ret
  </code></pre>
  
  <p>What is wrong here and how do I fix it?</p>
  
  <p>The problem is somewhat related to <a href="https://stackoverflow.com/q/5485468/471164">this question</a> although errors and instructions in questions are different.</p>