-
Notifications
You must be signed in to change notification settings - Fork 155
Description
Qt Documentation says "Tells the compiler that the current point cannot be reached by any execution, so it may optimize any code paths leading here as dead code, as well as code continuing from here..." "...The advantage of inserting Q_UNREACHABLE() at that point is that the compiler is told not to generate code for a shape variable containing that value. If the macro is missing, the compiler will still generate the necessary comparisons for that value. If the case label were removed, some compilers could produce a warning that some enum values were not checked."
I could not compile QHexEdit under Ubuntu QT6. Obviously the criterion “QT_VERSION >= QT_VERSION_CHECK(6,0,0)” does not work reliably.
This optimization does not bring any significant benefit other than that described above. I am happy to forego the benefit in favor of secure compilation.