Use the latest version, but track down and understand every warning -Wall . For added fun, there are more warning flags for frob. You have an extensive set of regression tests (and others), run them all and test them.
GCC (notably C ++, but also C) has changed a lot. It significantly improves code analysis and optimization and processes code that, as it turns out, causes undefined bahaviiour in different ways. Therefore, code that "worked fine" but really relied on a specific interpretation of invalid constructs would probably break. We hope that the compiler will issue a warning or error, but does not guarantee such luck.
vonbrand
source share