public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/91415] Invalid warning for C++17 sequencing of shift operator E1<<E2.
[not found] <bug-91415-4@http.gcc.gnu.org/bugzilla/>
@ 2020-12-04 7:51 ` nico at josuttis dot de
2020-12-07 19:31 ` mpolacek at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 4+ messages in thread
From: nico at josuttis dot de @ 2020-12-04 7:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91415
Nicolai Josuttis <nico at josuttis dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nico at josuttis dot de
--- Comment #11 from Nicolai Josuttis <nico at josuttis dot de> ---
int j = i++ << i++;
is still not handled correctly in 9.3, 10.1, and 11.0.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/91415] Invalid warning for C++17 sequencing of shift operator E1<<E2.
[not found] <bug-91415-4@http.gcc.gnu.org/bugzilla/>
2020-12-04 7:51 ` [Bug c++/91415] Invalid warning for C++17 sequencing of shift operator E1<<E2 nico at josuttis dot de
@ 2020-12-07 19:31 ` mpolacek at gcc dot gnu.org
2020-12-10 16:38 ` nico at josuttis dot de
2023-07-29 18:10 ` pinskia at gcc dot gnu.org
3 siblings, 0 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-12-07 19:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91415
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
--- Comment #12 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
(In reply to Nicolai Josuttis from comment #11)
> int j = i++ << i++;
> is still not handled correctly in 9.3, 10.1, and 11.0.
How come? We warn with -std=c++14 but not -std=c++17, which seems correct.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/91415] Invalid warning for C++17 sequencing of shift operator E1<<E2.
[not found] <bug-91415-4@http.gcc.gnu.org/bugzilla/>
2020-12-04 7:51 ` [Bug c++/91415] Invalid warning for C++17 sequencing of shift operator E1<<E2 nico at josuttis dot de
2020-12-07 19:31 ` mpolacek at gcc dot gnu.org
@ 2020-12-10 16:38 ` nico at josuttis dot de
2023-07-29 18:10 ` pinskia at gcc dot gnu.org
3 siblings, 0 replies; 4+ messages in thread
From: nico at josuttis dot de @ 2020-12-10 16:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91415
--- Comment #13 from Nicolai Josuttis <nico at josuttis dot de> ---
Oh, sorry, your are right, the example indeed works.
BUT: I used in fact a slightly different example
(sorry, didn't expect that there is a difference):
int main() {
int i = 0;
int j = i++ << i++; // OK, NO WARNING
std::cout << i++ << i++; // still WARNING
}
see https://wandbox.org/permlink/ioZnOv3oAp5F0BsQ
According to my understanding the warning should especially
also not come when we pass i++ twice to std::cout
(to sequence output was a key goal of this fix in C++17).
But may be I am missing something.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/91415] Invalid warning for C++17 sequencing of shift operator E1<<E2.
[not found] <bug-91415-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2020-12-10 16:38 ` nico at josuttis dot de
@ 2023-07-29 18:10 ` pinskia at gcc dot gnu.org
3 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-29 18:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91415
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=83028
--- Comment #14 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Nicolai Josuttis from comment #13)
> Oh, sorry, your are right, the example indeed works.
> BUT: I used in fact a slightly different example
> (sorry, didn't expect that there is a difference):
>
> int main() {
> int i = 0;
> int j = i++ << i++; // OK, NO WARNING
> std::cout << i++ << i++; // still WARNING
> }
>
> see https://wandbox.org/permlink/ioZnOv3oAp5F0BsQ
>
> According to my understanding the warning should especially
> also not come when we pass i++ twice to std::cout
> (to sequence output was a key goal of this fix in C++17).
>
> But may be I am missing something.
That would be PR 83028 .
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-07-29 18:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-91415-4@http.gcc.gnu.org/bugzilla/>
2020-12-04 7:51 ` [Bug c++/91415] Invalid warning for C++17 sequencing of shift operator E1<<E2 nico at josuttis dot de
2020-12-07 19:31 ` mpolacek at gcc dot gnu.org
2020-12-10 16:38 ` nico at josuttis dot de
2023-07-29 18:10 ` pinskia at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).