Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [~/src] cat test.cpp
- int main()
- {
- char* a = "hello";
- return 0;
- }
- [~/src] g++ --version
- g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)
- Copyright (C) 2010 Free Software Foundation, Inc.
- This is free software; see the source for copying conditions. There is NO
- warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- [~/src] g++ -o test.exe test.cpp
- test.cpp: In function ‘int main()’:
- test.cpp:3: warning: deprecated conversion from string constant to ‘char*’
- [~/src] g++ -Wall -o test.exe test.cpp
- test.cpp: In function ‘int main()’:
- test.cpp:3: warning: deprecated conversion from string constant to ‘char*’
- test.cpp:3: warning: unused variable ‘a’
- [~/src] vanilla-g++-4.7.2 -o test.exe test.cpp
- test.cpp: In function ‘int main()’:
- test.cpp:3:12: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
- [~/src] vanilla-g++-4.7.2 -Wall -o test.exe test.cpp
- test.cpp: In function ‘int main()’:
- test.cpp:3:12: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
- test.cpp:3:8: warning: unused variable ‘a’ [-Wunused-variable]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement