Details
-
Task
-
Status: Closed (View Workflow)
-
Medium
-
Resolution: Fixed
-
None
-
None
-
None
Description
GCC 7 should enter Stage 4 this week (actually tomorrow). This means that only bug fixes and documentation changes can be committed (usually).
I have compiled ROOT 6.08 [dd4fcde9afed9172a2445f01c7c9a0b6cd6151d7, Dec 3th] with GCC 7 (a day old build) with CMS options. I did compile, I guess, because you don't use -Werror.
root608_gcc7_warnings.log contains warnings within ROOT (LLVM paths were filtered out).
root608_fullbuild.log.xz is a full build long where one can find more context.
There are basically ~4 warnings/errors (depends on your flags) that pop up with GCC 7.
1. throw() was deprecated since C++11 in function signature. Use newer noexcept instead.
2. implicit fallthroughs in switch case needs to market. In C+17 there is [[fallthrough]] attribute, which is available on GNU systems as [[gnu::fallthrough]] in C11 and C+14. One can also use GNU style attributes or comments with specific format. There is also probably a builtin function for this. Clang had this warning for years.
3. There are another couple of warnings that checks string formats (or similar) and calculates the maximum length of buffer needed. If it does not match up with what you have you get a warning. In most cases people (hopefully use snprintf) thus you gonna get the string truncated on large values, but not a buffer overflow.