Guest User

Untitled

a guest
May 27th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. $ ../cpla.sh p178
  2. $ clang++ p178.cpp -std=c++03 -Wall
  3. p178.cpp:12:2: error: expected expression
  4. [[maybe_unused]] void f([[maybe_unused]] bool thing1,
  5. ^
  6. p1798.cpp:12:18: error: expected unqualified-id
  7. [[maybe_unused]] void f([[maybe_unused]] bool thing1,
  8. ^
  9. p178.cpp:21:3: error: use of undeclared identifier 'f'
  10. f(a,b);
  11. ^
  12. 3 errors generated.
  13. $ clang++ p178.cpp -std=c++2a -Wall
  14. b=1
  15. C++N4741(96)10.6.6 Maybe unused attribute [dcl.attr.unused]p178.cpp
  16.  
  17. $ g++-8 p178.cpp -std=c++03 -Wall
  18. p178.cpp:12:1: error: expected unqualified-id before '[' token
  19. [[maybe_unused]] void f([[maybe_unused]] bool thing1,
  20. ^
  21. p178.cpp: In function 'int main()':
  22. p178.cpp:21:3: error: 'f' was not declared in this scope
  23. f(a,b);
  24. ^
  25.  
  26. $ g++-8 p178.cpp -std=c++2a -Wall
  27. b=1
  28. C++N4741(96)10.6.7 Maybe unused attribute [dcl.attr.unused]p178.cpp
Add Comment
Please, Sign In to add comment