File tree 5 files changed +11
-1
lines changed
5 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 1
1
testapp
2
+ testapp-clang
2
3
3
4
# Prerequisites
4
5
* .d
Original file line number Diff line number Diff line change 7
7
mv lib/* .so .
8
8
9
9
g++ -std=c++14 -L. -ltest -Wl,-rpath=' ${ORIGIN}' -o testapp testapp.cpp
10
+ clang++ -std=c++14 -L. -ltest-clang -Wl,-rpath=' ${ORIGIN}' -o testapp-clang testapp.cpp
10
11
Original file line number Diff line number Diff line change @@ -15,13 +15,14 @@ void printStructInfo11();
15
15
16
16
struct A2
17
17
{
18
- uint16_t m{ 3 };
18
+ uint16_t m { 65535 };
19
19
bool n;
20
20
};
21
21
22
22
struct B2 : public A2
23
23
{
24
24
bool o;
25
+
25
26
};
26
27
27
28
void printStruct2Info11 ();
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
g++ -std=c++11 -fPIC -c -o mytest.o Test.cpp
3
3
gcc -shared -o libtest.so mytest.o
4
+
5
+ clang++ -std=c++11 -fPIC -c -o mytest-clang.o Test.cpp
6
+ clang++ -shared -o libtest-clang.so mytest.o
7
+
Original file line number Diff line number Diff line change @@ -35,9 +35,12 @@ void printStruct2Info14()
35
35
int main ()
36
36
{
37
37
38
+ std::cout << " \n *********** Type 1\n " ;
38
39
printStructInfo11 ();
39
40
printStructInfo14 ();
40
41
42
+ std::cout << " \n *********** Type 2\n " ;
43
+
41
44
printStruct2Info11 ();
42
45
printStruct2Info14 ();
43
46
}
You can’t perform that action at this time.
0 commit comments