forked from huanght1997/CPP-Primer-Plus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathg++Warning.txt
45 lines (42 loc) · 2.84 KB
/
g++Warning.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
(In ch03)
init.cpp: In function 'int main()':
init.cpp:9:16: warning: overflow in implicit constant conversion [ -Woverflow]
int debt = 7.2E12; // result not defined in C++
^
(In ch07)
strgfun.cpp: In function 'int main()':
strgfun.cpp:11:18: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
char *wail = "ululate";
^
(In ch08)
strquote.cpp: In function 'const string& version3(std::string&, const string&)':
strquote.cpp:53:12: warning: reference to local variable 'temp' returned [-Wreturn-local-addr]
string temp;
^
leftover.cpp: In function 'int main()':
leftover.cpp:9:19: warning: deprecated conversion from string constant to 'char*' [Wwrite-strings]
char * trip = "Hawaii!!";
^
(In ch14)
worker0.cpp:47:51: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
"soprano", "bass", "baritone", "tenor"};
^
worker0.cpp:47:51: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
worker0.cpp:47:51: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
worker0.cpp:47:51: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
worker0.cpp:47:51: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
worker0.cpp:47:51: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
worker0.cpp:47:51: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
workermi.cpp:57:51: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
"soprano", "bass", "baritone", "tenor"};
^
workermi.cpp:57:51: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
workermi.cpp:57:51: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
workermi.cpp:57:51: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
workermi.cpp:57:51: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
workermi.cpp:57:51: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
workermi.cpp:57:51: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
frnd2tmp.cpp:16:43: warning: friend declaration ‘void reports(HasFriend<T>&)’ declares a non-template function [-Wnon-template-friend]
friend void reports(HasFriend<T> &); // template parameter
^
frnd2tmp.cpp:16:43: note: (if this is not what you intended, make sure the function template has already been declared and add <> after the function name here)