3 ms·
Clang (trunk) in godbolt.org seems to produce the same code for both C and C++ (with -O3). Maybe this is some sort of optimization chance that the C-specific pa
by badsectoracula 8y ago
Clang (trunk) in godbolt.org seems to produce the same code for both C and C++ (with -O3). Maybe this is some sort of optimization chance that the C-specific parts of both GCC and Clang didn't catch until now?
- jcelerier 8y agoGCC in godbolt is always C++, even if you pass -std=c89/c99 : https://godbolt.org/g/SFMB1G https://godbolt.org/g/SFMB1G ; Clang doesn't even compile with -std=c89
- badsectoracula 8y agoDo not pass -std, just select the language from the combobox at the top right side of the source window. Your code doesn't compile (__cplusplus is undefined) if you select C. (btw i was talking about Clang, not GCC above)
- jcelerier 8y agodamn! I use godbolt everyday and didn't ever notice that you could change language like this. thanks!