Last change
on this file since d84f2ae was
10b5970,
checked in by Michael Brooks <mlbrooks@…>, 2 weeks ago
|
Fix many test-suite- and libcfa-caused unused variable warnings.
In scope are easy fixes among tests whose sole warnings were unused variable. Reduces the wflags lax list by 40%.
|
-
Property mode set to
100644
|
File size:
332 bytes
|
Line | |
---|
1 | // Some runtime tests for goto. |
---|
2 | |
---|
3 | #include <fstream.hfa> |
---|
4 | |
---|
5 | // Make sure loop hoisting |
---|
6 | void gotoLabelledLoop() { |
---|
7 | sout | "goto-loop"; |
---|
8 | goto label; |
---|
9 | sout | "!"; |
---|
10 | |
---|
11 | // Verbose loop will lead to lifting. |
---|
12 | label: for (int i = 0 ; i < 2 ; ++i) { |
---|
13 | sout | "loop"; |
---|
14 | } |
---|
15 | sout | "end" | nl; |
---|
16 | } |
---|
17 | |
---|
18 | int main() { |
---|
19 | sout | nlOff; |
---|
20 | |
---|
21 | gotoLabelledLoop(); |
---|
22 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.