Puzzled about the verdict difference between G++14 and G++17

Revision en1, by yongwhan, 2020-06-19 07:16:47

Hi guys,

Just a quick question, as I am quite puzzled about the verdict difference.

Those two codes are identical, but it passes in G++17 and fails in G++14.

G++14 Verdict

G++17 Verdict

Locally, those two seem to both produce -2 as an answer for the first test case for both G++14 and G++17.

I am guessing I made a trivial mistake somewhere.

Could you guys enlighten me with why it passes on one but not the other? I am guessing it could be due to using unsupported/undefined behavior in G++14.

Thanks a lot!

Yongwhan

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English yongwhan 2020-06-19 07:16:47 720 Initial revision (published)