title: Gcc not working on MacOS 10.15.4 Catalina?
body: <p>I wanted to start writing c++ code again and I just realized that the homebrew version of <code>gcc</code> does not compile any c++, c, or even fortran programs.</p>
  
  <p>For example, I tried to compile the following simple hello_world.cpp program:</p>
  
  <pre><code>#include&lt;iostream&gt;
  
  int main()
  {
      std::cout &lt;&lt; "Hello World!" &lt;&lt; std::endl;
      return 0;
  }
  </code></pre>
  
  <p>using</p>
  
  <pre><code>g++-9 hello_world.cpp
  </code></pre>
  
  <p>The output I get is:</p>
  
  <pre><code>FATAL:/usr/local/Cellar/cctools/855/bin/../libexec/as/x86_64/as: I don't understand 'm' flag!
  </code></pre>
  
  <p>I tried installing <code>gcc@8</code>, <code>gcc@7</code>, and compile but I still get the same message.</p>
  
  <p>Moreover, the same error message is shown when I try to compile a <code>hello_world.c</code> program using <code>gcc-9</code> and a <code>hello_world.f90</code> program using <code>gfortran-9</code>.</p>
  
  <p>The programs <code>*.c</code> and <code>*.cpp</code> compile fine with the <code>clang</code> and <code>clang++</code> compilers respectively. I also learned that <code>as</code> is an assembler, and that gcc can output a <code>*.s</code> file using the flag <code>gcc -S</code> but I still don't understand the error message.</p>
  
  <p>I think I exhausted my c++ knowledge and internet search  before posting so thank you in advance!</p>