Skip to content

Instantly share code, notes, and snippets.

@Piyush3dB
Created October 28, 2016 14:44
Show Gist options
  • Save Piyush3dB/79c0341bb964f5992632c280691e1729 to your computer and use it in GitHub Desktop.
Save Piyush3dB/79c0341bb964f5992632c280691e1729 to your computer and use it in GitHub Desktop.
>>> g++ -c -std=c++11 ./src/deprecated-attribute.cpp
./src/deprecated-attribute.cpp:3:10: warning: ‘deprecated’ attribute directive ignored [-Wattributes]
void foo() {}
^
>>> echo $?
0
>>> g++ -c ./src/deprecated-attribute.cpp
./src/deprecated-attribute.cpp:2:1: error: expected unqualified-id before ‘[’ token
[[deprecated("will be removed in future")]]
^
./src/deprecated-attribute.cpp: In function ‘int main()’:
./src/deprecated-attribute.cpp:6:9: error: ‘foo’ was not declared in this scope
foo();
^
>>> echo $?
1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment