Guest User

Untitled

a guest
May 20th, 2018
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.13 KB | None | 0 0
  1. $ ../cpla.sh p100a
  2. $ clang++ p100a.cpp -std=c++03 -Wall
  3. p100a.cpp:24:12: warning: multiple unsequenced modifications to 'i' [-Wunsequenced]
  4. int x = S(i=1) << (i=2);
  5. ^ ~
  6. p100a.cpp:25:23: warning: multiple unsequenced modifications to 'j' [-Wunsequenced]
  7. int y = operator<<(S(j=1), j=2);
  8. ^ ~
  9. 2 warnings generated.
  10. Assertion failed: (s == "I have heard it works only if you believe in it"), function f, file p100a.cpp, line 15.
  11. ../cpla.sh: line 6: 14184 Abort trap: 6 ./$1l03 $2
  12. $ clang++ p100a.cpp -std=c++2a -Wall
  13. p100a.cpp:24:12: warning: multiple unsequenced modifications to 'i' [-Wunsequenced]
  14. int x = S(i=1) << (i=2);
  15. ^ ~
  16. p100a.cpp:25:23: warning: multiple unsequenced modifications to 'j' [-Wunsequenced]
  17. int y = operator<<(S(j=1), j=2);
  18. ^ ~
  19. 2 warnings generated.
  20. Assertion failed: (s == "I have heard it works only if you believe in it"), function f, file p100a.cpp, line 15.
  21. ../cpla.sh: line 11: 14188 Abort trap: 6 ./$1l2a $2
  22.  
  23. $ g++-8 p100a.cpp -std=c++03 -Wall
  24. p100a.cpp: In function 'void __static_initialization_and_destruction_0(int, int)':
  25. p100a.cpp:24:21: warning: operation on 'i' may be undefined [-Wsequence-point]
  26. int x = S(i=1) << (i=2);
  27. ~~^~~
  28. p100a.cpp:25:29: warning: operation on 'j' may be undefined [-Wsequence-point]
  29. int y = operator<<(S(j=1), j=2);
  30. ~^~
  31. Assertion failed: (s == "I have heard it works only if you believe in it"), function f, file p100a.cpp, line 15.
  32. ../cpla.sh: line 17: 14197 Abort trap: 6 ./$1g03 $2
  33.  
  34. $ g++-8 p100a.cpp -std=c++2a -Wall
  35. p100a.cpp: In function 'void __static_initialization_and_destruction_0(int, int)':
  36. p100a.cpp:24:21: warning: operation on 'i' may be undefined [-Wsequence-point]
  37. int x = S(i=1) << (i=2);
  38. ~~^~~
  39. p100a.cpp:25:29: warning: operation on 'j' may be undefined [-Wsequence-point]
  40. int y = operator<<(S(j=1), j=2);
  41. ~^~
  42. Assertion failed: (s == "I have heard it works only if you believe in it"), function f, file p100a.cpp, line 15.
  43. ../cpla.sh: line 23: 14206 Abort trap: 6 ./$1g2a $2
Add Comment
Please, Sign In to add comment