Linked by Thom Holwerda on Tue 6th Mar 2018 20:08 UTC
Google

As of Chrome 64, Chrome for Windows is compiled with Clang. We now use Clang to build Chrome for all platforms it runs on: macOS, iOS, Linux, Chrome OS, Android, and Windows. Windows is the platform with the second most Chrome users after Android according to statcounter, which made this switch particularly exciting.

Thread beginning with comment 654362
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[4]: slow decline of GCC ?
by viton on Thu 8th Mar 2018 11:06 UTC in reply to "RE[3]: slow decline of GCC ?"
viton
Member since:
2005-08-09

But if I turned on optimizations under GCC, the program would crash. Some logic or checks were getting optimized out, but only under GCC, and causing instability.

That means your code is incorrect and suffering from undefined behaviour.
GCC generate more aggressive, faster code than C-lang.
There are a lot of articles on C++ undefined behaviour.

When some parts of your code are optimised-out it means these parts are redundant or not used.

I have also noticed GCC throwing incorrect warnings. Like "This variable is declared but unused."

Check twice. It is pretty safe to assume error is on your side.
Try with different GCC versions. Its is highly unlikely that you found some untested path.

Edited 2018-03-08 11:15 UTC

Reply Parent Score: 4

RE[5]: slow decline of GCC ?
by Kochise on Thu 8th Mar 2018 13:48 in reply to "RE[4]: slow decline of GCC ?"
Kochise Member since:
2006-03-03

Yup, try different gcc versions, forks, branches, vendor revisions, one might by chance fit your need for your project. But you might have to walk the same trial and error path to find the suitable gcc incarnation for another project.

Or just switch to a mature compiler that is not fuzzy and ticklish, no leaves gaping holes open for years, implement the standard correctly without implementing "extensions" that are not compatible with the competition.

Bref, a suitable 3rd millennium compliant compiler. Not a thing from the past.

Reply Parent Score: -1

RE[6]: slow decline of GCC ?
by viton on Fri 9th Mar 2018 07:11 in reply to "RE[5]: slow decline of GCC ?"
viton Member since:
2005-08-09

Yup, try different gcc versions, forks, branches, vendor revisions, one might by chance fit your need for your project.

That I proposed was a way to diagnose the problem. If you think the problem is compiler specific - try different version to make sure.

A lot of programs in devices around you are compiled with GCC and optimization enabled. If your software is unstable, GCC isn’t the right thing to blame.

Edited 2018-03-09 07:12 UTC

Reply Parent Score: 3

RE[5]: slow decline of GCC ?
by kwan_e on Thu 8th Mar 2018 14:18 in reply to "RE[4]: slow decline of GCC ?"
kwan_e Member since:
2007-02-18

When some parts of your code are optimised-out it means these parts are redundant or not used.


Or you're checking this for null.

Reply Parent Score: 2