Originally posted by zman0900
View Post
Announcement
Collapse
No announcement yet.
Mesa Can Finally Build With Almost No Compiler Warnings
Collapse
X
-
Originally posted by fuzz View PostWay to complain about open source code and not contribute fixes.
- Likes 13
Comment
-
Originally posted by varikonniemi View PostYes, i am amazed at the nonchalant attitude towards warnings. A stable release should not happen with one. Either change the code, or the compiler.
That warning fires every time a string function takes an argument that could possibly be longer than its max output, which triggers all over the place, especially when working with file paths ("what if every file path is MAX_PATH long?" is what GCC is saying, which is really annoying when we *know* that "/dev/dri/cardN" is not gonna be 4096 char long and it's safe to store it in a 32-char array).
- Likes 5
Comment
-
Originally posted by phoronix View PostPhoronix: Mesa Can Finally Build With Almost No Compiler Warnings
Quite a feat for modern open-source projects with large C/C++ code-bases developed over the years, Mesa3D can almost be compiled now without any warnings -- there's just one remaining...
http://www.phoronix.com/scan.php?pag...piler-Warnings
So Mesa is focusing on "Microsoft Code Quality" goals -> "If it compiles, SHIP IT!!"
- Likes 2
Comment
-
Originally posted by NotMine999 View PostSo Mesa is focusing on "Microsoft Code Quality" goals -> "If it compiles, SHIP IT!!"
- Likes 1
Comment
-
my eyes are bleeding from patch and code it patches. this is not c++. and it is not c++ by definition: it is full of ubs (*). c++ compiler can do anything to code with ub precisely because it only promised to compile c++ code and programmer failed his contract by supplying program in some other(imaginary) language.
btw, it does not fix warning, it just silences it
*) start here https://en.cppreference.com/w/cpp/string/byte/memcpyLast edited by pal666; 21 September 2018, 10:02 PM.
- Likes 3
Comment
-
Originally posted by droste View Post
To quote one of the changes:
Soooo the code is correct so there's nothing to change. But how would you change the compiler so that it knows that a specific path can't be longer than 4096? Let me know if you find out
- Likes 1
Comment
-
Originally posted by zman0900 View Post
I bet a big part of that is code that originally produced no warnings, but newer compilers are better at finding problems / have more warnings.
Specially since version 7 gcc is a lot more Verbose..
If you code with gcc 6 and I compile with seven or 8 a lot of warnings will apear, since there is not a rule that fit all, the code reflect some compromises..
But the warnings, are just warnings..the problem is compiler take decisions by himself, and that sometimes lead to big problems..at least since version 4.7 if I can remember.
The Linux kernel has its share of suffering, with gcc, trying to play tricks
I remember some Bug episodes, the most problematic took almost a year to solve...but at the end...
hoo the compiler changed the generated assembler, from what was supposed to be...to its own version...LOL
- Likes 1
Comment
Comment