Closed KeramKeram closed 7 years ago
For test I turned off this flag, now I have shift-negative-value... Migrate to gcc 6.x it will take some time.
I uploaded two small changes required for fedora 24 but changes in flags I have only on my local branch.
gcc 6 is not only in fedora but in ubuntu above version 16.04. I will today push "patch", he will turn off this two new flags but remember, you need still investigate this.
Things to do:
You can always ask here or on skype.
misleading-indentation - check that after for() or if()(or other like that without braces) not exist 2 expression in one line, for example: for() expression1;expression2; //this reports error
for() expression1; expression2; //this don't reports error
shift-negative-value - check that shifted value is nagative, for example: (-1 << 5); // this reports error (1 << 5); // ok
If we want to use this flags we would have to change external file(ext/stb/stb_image.h). So we are forced to use: if (GCC_VERSION VERSION_GREATER 6.0) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-misleading-indentation") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-shift-negative-value") endif()
It should be able by add_compile_options of cmake but I'm not sure if we should, @filipwasil ?
agree
I update to fedora 24 and now I have gcc 6.2 but in this version we have something like: " -Wmisleading-indentation
A new warning -Wmisleading-indentation was added to -Wall, warning about places where the indentation of the code might mislead a human reader about the control flow: " Turn off this or do changes in code? (many of them i required I think we should turn off this).
For current code and flags I have error during building.