https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80472
--- Comment #13 from Jonathan Wakely ---
(In reply to Jonathan Wakely from comment #12)
> Improving the warning in comment 4 is irrelevant to this bug.
I've created Bug 89800 for improving that warning, please move that discussion
there.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80472
--- Comment #12 from Jonathan Wakely ---
And as I've already said, the quality of the particular
-Waggressive-loop-optimizations warning is a separate issue, and should be
dealt with in a separate PR.
PR 58876 (mentioned in comment 0 as the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80472
--- Comment #11 from Manuel López-Ibáñez ---
I'm not being pedantic for the sake of being pedantic. It is trivial to fix
the #pragma as I explained above. However, that won't give the user any
idea about which user code is triggering the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80472
--- Comment #10 from Jonathan Wakely ---
(In reply to Manuel López-Ibáñez from comment #8)
> There is no negative n__ in user code.
If you want to be pedantic, there's no __n at all in user code. Because it's a
function parameter of
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80472
--- Comment #9 from Jonathan Wakely ---
There is though. std::prev(it, n) is specified as std::advance(it, -n). Calling
prev means advancing a negative amount.
But I'm not sure what your point is. Currently there's no warning by default
even
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80472
--- Comment #8 from Manuel López-Ibáñez ---
There is no negative n__ in user code.
On Fri, 22 Mar 2019, 21:21 redi at gcc dot gnu.org, <
gcc-bugzi...@gcc.gnu.org> wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80472
>
> --- Comment #7
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80472
--- Comment #7 from Jonathan Wakely ---
A comment added to the code would make the caret diagnostic self-explanatory:
--- a/libstdc++-v3/include/bits/stl_iterator_base_funcs.h
+++ b/libstdc++-v3/include/bits/stl_iterator_base_funcs.h
@@ -149,7
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80472
--- Comment #6 from Jonathan Wakely ---
Is it better to silently generate code with undefined behaviour, or issue a
flawed warning about that undefined behaviour?
If the warning doesn't show the template instantiation context that's a
separate
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80472
--- Comment #5 from Manuel López-Ibáñez ---
This warning will be incomprehensible to users because the warning never
mentions any code that the user can modify. What should the user do
according to the warning?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80472
--- Comment #4 from Jonathan Wakely ---
Another place where I'd like to selectively enable warnings is for this code
(from PR 78830):
#include
#include
int main()
{
std::forward_list il = {1, 2, 3, 4, 5, 6, 7};
auto iter =
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80472
Manuel López-Ibáñez changed:
What|Removed |Added
Keywords||easyhack
--- Comment #3 from
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80472
Manuel López-Ibáñez changed:
What|Removed |Added
CC||manu at gcc dot gnu.org
---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80472
Marek Polacek changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|
13 matches
Mail list logo