Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Side by Side Diff: gdb/testsuite/gdb.cp/m-static.cc

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gdb/testsuite/gdb.cp/m-data.exp ('k') | gdb/testsuite/gdb.cp/m-static.exp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // 2002-05-13 1 // 2002-05-13
2 2
3 enum region { oriental, egyptian, greek, etruscan, roman }; 3 enum region { oriental, egyptian, greek, etruscan, roman };
4 4
5 void keepalive(bool *var) { }
6
5 // Test one. 7 // Test one.
6 class gnu_obj_1 8 class gnu_obj_1
7 { 9 {
8 protected: 10 protected:
9 typedef region antiquities; 11 typedef region antiquities;
10 static const bool test = true; 12 static const bool test = true;
11 static const int key1 = 5; 13 static const int key1 = 5;
12 static long key2; 14 static long key2;
13 15
14 static antiquities value; 16 static antiquities value;
15 17
16 public: 18 public:
17 gnu_obj_1(antiquities a, long l) {} 19 gnu_obj_1(antiquities a, long l) {}
18 20
19 long method () 21 long method ()
20 { 22 {
21 static bool svar = true; 23 static bool svar = true;
24 keepalive (&svar);
22 return key2; 25 return key2;
23 } 26 }
24 }; 27 };
25 28
26 const bool gnu_obj_1::test; 29 const bool gnu_obj_1::test;
27 const int gnu_obj_1::key1; 30 const int gnu_obj_1::key1;
28 long gnu_obj_1::key2 = 77; 31 long gnu_obj_1::key2 = 77;
29 gnu_obj_1::antiquities gnu_obj_1::value = oriental; 32 gnu_obj_1::antiquities gnu_obj_1::value = oriental;
30 33
31 34
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 gnu_obj_3<long> test3(greek); 77 gnu_obj_3<long> test3(greek);
75 gnu_obj_4 test4; 78 gnu_obj_4 test4;
76 79
77 test4.dummy = test4.elsewhere; 80 test4.dummy = test4.elsewhere;
78 test4.dummy = 0; 81 test4.dummy = 0;
79 82
80 test1.method (); // breakpoint: constructs-done 83 test1.method (); // breakpoint: constructs-done
81 84
82 return test4.dummy; 85 return test4.dummy;
83 } 86 }
OLDNEW
« no previous file with comments | « gdb/testsuite/gdb.cp/m-data.exp ('k') | gdb/testsuite/gdb.cp/m-static.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698