public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/83028] Incorrect -Wsequence-point warning in correct C++17 code with new evaluation order rules
       [not found] <bug-83028-4@http.gcc.gnu.org/bugzilla/>
@ 2020-04-13 21:00 ` msebor at gcc dot gnu.org
  2020-05-15 15:36 ` rafael at espindo dot la
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: msebor at gcc dot gnu.org @ 2020-04-13 21:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83028

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |msebor at gcc dot gnu.org
   Last reconfirmed|                            |2020-04-13
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
Confirmed.  Unless the C++ 2a standard defines behavior in all cases issuing
the warning for both valid (in C++ 2a) and invalid code code on the bases that
it's invalid in some other standard or language, and without distinguishing
between the valid uses from the invalid ones, would make the warning
meaningless.  At a minimum, the warning should be split into two: one for
portability to other standards/languages, and another for problems in C++ 2a.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/83028] Incorrect -Wsequence-point warning in correct C++17 code with new evaluation order rules
       [not found] <bug-83028-4@http.gcc.gnu.org/bugzilla/>
  2020-04-13 21:00 ` [Bug c++/83028] Incorrect -Wsequence-point warning in correct C++17 code with new evaluation order rules msebor at gcc dot gnu.org
@ 2020-05-15 15:36 ` rafael at espindo dot la
  2023-09-06  6:19 ` gayathri.gottumukkala.27 at gmail dot com
  2023-09-06 13:46 ` redi at gcc dot gnu.org
  3 siblings, 0 replies; 4+ messages in thread
From: rafael at espindo dot la @ 2020-05-15 15:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83028

Rafael Avila de Espindola <rafael at espindo dot la> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rafael at espindo dot la

--- Comment #3 from Rafael Avila de Espindola <rafael at espindo dot la> ---
We just hit this and incorrectly assumed our codebase had a bug. It would be
really nice for this warning to take -std=XX into consideration and not warn
for code that is now valid.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/83028] Incorrect -Wsequence-point warning in correct C++17 code with new evaluation order rules
       [not found] <bug-83028-4@http.gcc.gnu.org/bugzilla/>
  2020-04-13 21:00 ` [Bug c++/83028] Incorrect -Wsequence-point warning in correct C++17 code with new evaluation order rules msebor at gcc dot gnu.org
  2020-05-15 15:36 ` rafael at espindo dot la
@ 2023-09-06  6:19 ` gayathri.gottumukkala.27 at gmail dot com
  2023-09-06 13:46 ` redi at gcc dot gnu.org
  3 siblings, 0 replies; 4+ messages in thread
From: gayathri.gottumukkala.27 at gmail dot com @ 2023-09-06  6:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83028

Gayathri Gottumukkala <gayathri.gottumukkala.27 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gayathri.gottumukkala.27@gm
                   |                            |ail.com

--- Comment #4 from Gayathri Gottumukkala <gayathri.gottumukkala.27 at gmail dot com> ---
The code gives warning if we use different flags while compiling. If we give
individual print statements instead of one single statement, then there will be
no warnings and it is compiled successfully.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug c++/83028] Incorrect -Wsequence-point warning in correct C++17 code with new evaluation order rules
       [not found] <bug-83028-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2023-09-06  6:19 ` gayathri.gottumukkala.27 at gmail dot com
@ 2023-09-06 13:46 ` redi at gcc dot gnu.org
  3 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2023-09-06 13:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83028

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Yes, obviously, because separate statements have a sequence point between them.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-09-06 13:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-83028-4@http.gcc.gnu.org/bugzilla/>
2020-04-13 21:00 ` [Bug c++/83028] Incorrect -Wsequence-point warning in correct C++17 code with new evaluation order rules msebor at gcc dot gnu.org
2020-05-15 15:36 ` rafael at espindo dot la
2023-09-06  6:19 ` gayathri.gottumukkala.27 at gmail dot com
2023-09-06 13:46 ` redi 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).