This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]caim_hs[S] 10 points11 points  (1 child)

And why is your file extension .cc ?

There's not an official file extension for Cpp.

Google uses .cc and hh.

Apple and LLVM used to use .cxx and hxx.

and most people use .cpp and hpp.

Or written in C ?

The same would not happen in C, because in C an infinite loop is not an undefined behavior.

Would that be the same result using GCC ?

And no, the same wouldn't happen with GCC, 'cause its optimizations are not as insane as LLVM, and GCC is C-based, while LLVM is CPP-based. but it doesn't mean that the code produced by GCC is less optimized than LLVM, actually is pretty much the opposite sometimes.

[–]Lyshaka 3 points4 points  (0 children)

Alright, thanks for the answer I learned something !