1

while configuring my own system (Debian) to behaves like cs50-appliance I did realize that there is a variable, CC, that I had have to change its value to "clang". And looks like, by default, Debian set up its value to "cc", that is CC=cc.

I also realized that its possible to compile some C source-code through GNU make utility using the default value of CC (cc), but a lot of source-codes only compile correctly with CC value set to "clang".

So, what is the difference in compiling with variable CC in default "cc" and set it to "clang"?

1 Answer 1

3

cc is typically an alias to gcc in Debian systems as far as I know. both gcc and clang are C compilers.

a lot of source codes only compile correctly with CC value set to clang.

well, for the purpose of this course both gcc/cc and clang can be used interchangeably. both are still different compilers though. I think the chance that some code compiles with gcc but not clang is very minor.

clang is preferred to use for this course exactly because it produces more user-friendly error messages/warnings.

head for http://clang.llvm.org/comparison.html#gcc for more details on clang vs gcc!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .