Originally posted by oleid
View Post
Announcement
Collapse
No announcement yet.
Torvalds Has It With "-Wstringop-overflow" On GCC Due To Kernel Breakage
Collapse
X
-
This is exactly what I meant when I said (in another thread) that Torvalds did a tremendous disservice to linux with his rant about C++. With C++ this would not be an issue today.
... and it would be quiet in the camp of the rustafarians.
- Likes 3
Comment
-
Originally posted by lowflyer View PostThis is exactly what I meant when I said (in another thread) that Torvalds did a tremendous disservice to linux with his rant about C++. With C++ this would not be an issue today.
However, let's not pretend that C++ is a panacea to compiler false-positives. For instance, GCC has long had issues figuring out that a std:: optional's value isn't being used without initialization. So, on the specific topic of compiler warnings with false positives, using C++ would quite likely open the door to even more of these.
That's not meant as an argument one way or another, but just a reality check.
- Likes 1
Comment
-
Originally posted by coder View Post../. So, on the specific topic of compiler warnings with false positives, using C++ would quite likely open the door to even more of these.
That's not meant as an argument one way or another, but just a reality check.
Turning this warning off globally shows an unfortunate ignorance of the linux kernel team. It is another way of saying "we want to continue creating our questionable constructions and we don't care about better ones".
- Likes 1
Comment
-
Originally posted by coder View PostYes, with things like constructors and operator overloading, you can make nice string classes in C++ ...even ones appropriate for in-kernel use.
However, let's not pretend that C++ is a panacea to compiler false-positives. For instance, GCC has long had issues figuring out that a std:: optional's value isn't being used without initialization. So, on the specific topic of compiler warnings with false positives, using C++ would quite likely open the door to even more of these.
That's not meant as an argument one way or another, but just a reality check.Last edited by cj.wijtmans; 04 February 2024, 06:29 PM.
- Likes 2
Comment
-
Originally posted by lowflyer View PostTurning this warning off globally shows an unfortunate ignorance of the linux kernel team.
Speaking of ignorant, this feature wasn't on in the past, and they were trying to enable it when they got totally inconsistent results.
Comment
-
Originally posted by NateHubbard View Post
So, Torvalds is ignorant of the compiler issues?
Speaking of ignorant, this feature wasn't on in the past, and they were trying to enable it when they got totally inconsistent results.
- Likes 1
Comment
Comment