[Bug c++/84918] Better handling of "std::cout >> 42;"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84918 Jonathan Wakely changed: What|Removed |Added Target Milestone|9.5 |---
[Bug c++/84918] Better handling of "std::cout >> 42;"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84918 Richard Biener changed: What|Removed |Added Target Milestone|9.4 |9.5 --- Comment #7 from Richard Biener --- GCC 9.4 is being released, retargeting bugs to GCC 9.5.
[Bug c++/84918] Better handling of "std::cout >> 42;"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84918 Jakub Jelinek changed: What|Removed |Added Target Milestone|9.3 |9.4 --- Comment #6 from Jakub Jelinek --- GCC 9.3.0 has been released, adjusting target milestone.
[Bug c++/84918] Better handling of "std::cout >> 42;"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84918 Jakub Jelinek changed: What|Removed |Added Target Milestone|9.2 |9.3 --- Comment #5 from Jakub Jelinek --- GCC 9.2 has been released.
[Bug c++/84918] Better handling of "std::cout >> 42;"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84918 Jakub Jelinek changed: What|Removed |Added Target Milestone|9.0 |9.2 --- Comment #4 from Jakub Jelinek --- GCC 9.1 has been released.
[Bug c++/84918] Better handling of "std::cout >> 42;"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84918 Eric Gallager changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2018-06-18 Ever confirmed|0 |1 Severity|normal |enhancement --- Comment #3 from Eric Gallager --- (In reply to David Malcolm from comment #0) > https://www.reddit.com/r/cpp/comments/84op5c/usability_improvements_in_gcc_8/dvs5hjj/ > points out: > > > What is the current error message for > > std::cout >> 42; > > > On older compilers this would generate roughly 100 lines of unreadable > > error messages, so I detect and fix it in the static analyzer I wrote. > > Checking on godbolt.org: > > #include > void test () > { > std::cout >> 42; > } > > we currently spew dozens of lines of diagnostics. > > May be worth special-casing this, and offering a fix-it hint to convert ">>" > to "<<", if sane (and vice-versa). Confirmed... (In reply to Jonathan Wakely from comment #1) > This seems pretty low priority though ...as an enhancement then. (also ASSIGNED since there's an assignee)
[Bug c++/84918] Better handling of "std::cout >> 42;"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84918 --- Comment #2 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #1) > I'd much rather see a solution to the more general problem of drowning the > user in information when the overload set is very large. Which is now PR 84920
[Bug c++/84918] Better handling of "std::cout >> 42;"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84918 --- Comment #1 from Jonathan Wakely --- This seems pretty low priority though, there's a lot of output, but all of it tells you the problem: 42.cc:4:18: note: ‘std::ostream {aka std::basic_ostream}’ is not derived from ‘std::basic_istream<_CharT, _Traits>’ std::cout >> 42; ^~ I'd much rather see a solution to the more general problem of drowning the user in information when the overload set is very large. That happens with many operators, but especially << and >>. A special case to reduce that just for the trivial typo of using >> when you mean << doesn't help the common case. See PR 58713 comment 6 and 7
[Bug c++/84918] Better handling of "std::cout >> 42;"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84918 David Malcolm changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |dmalcolm at gcc dot gnu.org Target Milestone|--- |9.0