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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
import org.aspectj.testing.*;
public strictfp class StrictFpCompile {
public static void main(String[] args) {
new StrictFpCompile().go();
Tester.check(ran, "go did not run");
}
static boolean ran = false;
void go() {
ran = true;
}
}
// Ok, must be generated with strictfp modifier
strictfp interface StrictInterface {
// Has to be error, may not generate strictfp, but has to set strictfp in bytecode
// strictfp float test1();
// Ok, may not be generated with strictfp modifier
float test2();
};
// Ok, must be generated with strictfp modifier
strictfp abstract class StrictClass {
// Has to be an error
// strictfp float f;
// Ok
double d;
// Has to be error, may not generate strictfp, but has to set strictfp in bytecode
// strictfp StrictClass() {}
// Ok, must not generate strictfp, but has to set strictfp in bytecode
StrictClass(double _d) { d = _d; }
// Ok, may be generated with strictfp modifier
abstract float test1();
// Ok, may be generated with strictfp modifier
float test2() { return 0.f; }
// Ok, may be generated with strictfp modifier
strictfp float test3() { return 0.f; }
// Ok, may be generated with strictfp modifier
strictfp static float test4() { return 0.f; }
};
// Ok, may not be generated with strictfp modifier
class NonStrictClass {
// Ok
NonStrictClass() {}
// Ok, may not be generated with strictfp modifier
float test2() { return 0.f; }
// Ok, must be generated with strictfp modifier
strictfp float test3() { return 0.f; }
// Ok, must be generated with strictfp modifier
strictfp static float test4() { return 0.f; }
};
// Ok
strictfp class OuterStrictClass {
// Ok, may be generated with strictfp modifier
class InnerStrictClass {
// Ok, may be generated with strictfp modifier
class InnerInnerClass {
}
}
};
|