title: Compile Assembly code that includes header files containing C-definitions
body: <p>Im trying to compile assembly and C code together (not C to assembly), but cant get it done.</p>
  
  <p>For example</p>
  
  <p>file common.h</p>
  
  <pre><code>#ifndef __COMMON_H__
  #define __COMMON_H__
  
  struct tree{
          tree* left;
          tree* right;
  
          void* elem;
  };
  
  void foo(int c);
  #endif
  </code></pre>
  
  <p>file common.S</p>
  
  <pre><code>#include "common.h"
  
      .text
      .globl foo
      .ent foo
  foo:
       //foo implementation
  
      .end foo
  </code></pre>
  
  <p>When I try to compile this:</p>
  
  <pre><code># gcc -c common.S
  common.h: Assembler messages:
  common.h:5: Error: unrecognized opcode `struct tree{'
  common.h:7: Error: unrecognized opcode `tree* left'
  common.h:8: Error: unrecognized opcode `tree* right'
  common.h:10: Error: unrecognized opcode `void* elem'
  common.h:12: Error: junk at end of line, first unrecognized character is `}'
  common.h:14: Error: unrecognized opcode `void foo(int c)'
  </code></pre>
  
  <p>Any way to take C-definitions into assembly using gcc? </p>
  
  <p>Thanks in advance.</p>