https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105470
--- Comment #12 from Jonathan Wakely ---
(In reply to Roland Hughes from comment #10)
> There is no definition of that map anywhere in the codebase where
> KeyModifiers is declared const.
That's just how std::map works.
std::map::value_type is
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105470
--- Comment #11 from Roland Hughes ---
(In reply to Marek Polacek from comment #9)
> (In reply to Roland Hughes from comment #8)
> > (In reply to Marek Polacek from comment #1)
> > > Can you please provide a stand-alone test case?
> >
> > I wil
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105470
--- Comment #10 from Roland Hughes ---
(In reply to Marek Polacek from comment #1)
>
> The warning is completely correct, and the code should be fixed.
>
> for ( const std::pair &it : someMap )
>
> This iterates over a map, with values of typ
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105470
--- Comment #9 from Marek Polacek ---
(In reply to Roland Hughes from comment #8)
> (In reply to Marek Polacek from comment #1)
> > Can you please provide a stand-alone test case?
>
> I will work on this over the weekend.
Looks like that's not
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105470
--- Comment #8 from Roland Hughes ---
(In reply to Marek Polacek from comment #1)
> Can you please provide a stand-alone test case?
I will work on this over the weekend.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105470
--- Comment #7 from Jonathan Wakely ---
Yes, or use TheMapType::const_iterator. If you're going to name the type
explicitly, you need to be sure to use the correct type.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105470
--- Comment #6 from Andrew Pinski ---
(In reply to Jonathan Wakely from comment #5)
> GCC even tells you exactly how to fix the code.
>
> Here's the GCC error reformatted to make it a bit easier to read:
>
> error: loop variable it of type
> c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105470
--- Comment #5 from Jonathan Wakely ---
GCC even tells you exactly how to fix the code.
Here's the GCC error reformatted to make it a bit easier to read:
error: loop variable it of type
const std::pair&
binds to a temporary constructed from ty
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105470
Jonathan Wakely changed:
What|Removed |Added
Status|WAITING |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105470
--- Comment #3 from Jonathan Wakely ---
It looks more like you're using -Werror and a new warning in the new GCC is
being turned into an error, because you asked for it.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105470
Andrew Pinski changed:
What|Removed |Added
Last reconfirmed||2022-05-03
Status|UNCONFIRM
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105470
Marek Polacek changed:
What|Removed |Added
CC||mpolacek at gcc dot gnu.org
--- Comment
12 matches
Mail list logo