Is clang/llvm C/C++ different then gcc C/C++.

Yes, they are different. C/C++ is standardized, but every compiler since Borland C++ 1.0 has has extensions that some Makefiles will take advantage of. If you build with default options it shouldn't matter what compiler.

Basically:
c++ -o blah blah.cpp

should work if c++ is clang or g++

Starting to do:
c++ -O3 -fblahblahblah
you're going to run into differences.

Sorry, more characters to say the same thing as zirias@ ;)
 
Edit: It turns out others were faster on this one ?
"I hate it when that happens because it happens all the time"

It's a good lesson to make sure you only compile/build with standard options and pay attention to all warning and other messages from a compiler. I like "-Werror" it often results in better code.
 
Plum Hall had a C++ parser we were about to use but culdn't afford. I read the documentation about the differences w.r.t. gcc/VC++/Borland/... and was in despair. Cray used PH as a parser/front end for their compilers, that was where I had my first contact with them. Boy, that thing was picky...
 
  • Like
Reactions: mer
Back
Top