Thu, 07 Jun 2012 20:30:57 -0700
7170079: Adjustments to build-infra makefiles
Reviewed-by: ohair, ohrstrom, ihse, jonas
Contributed-by: jonas <jonas.oreland@oracle.com>, erikj <erik.joelsson@oracle.com>, ihse <magnus.ihse.bursie@oracle.com>, tgranat <torbjorn.granat@oracle.com>, ykantser <yekaterina.kantserova@oracle.com>
1 /*
2 * @test /nodynamiccopyright/
3 * @bug 6860965
4 * @summary Project Coin: binary literals
5 * @compile/fail/ref=BadBinaryLiterals.6.out -XDrawDiagnostics -source 6 -Xlint:-options BadBinaryLiterals.java
6 * @compile/fail/ref=BadBinaryLiterals.7.out -XDrawDiagnostics BadBinaryLiterals.java
7 */
9 public class BadBinaryLiterals {
10 int valid = 0b0; // valid literal, illegal in source 6
11 int baddigit = 0b012; // bad digit
12 //aaaabbbbccccddddeeeeffffgggghhhh
13 int overflow1 = 0b111111111111111111111111111111111; // too long for int
14 //aaaabbbbccccddddeeeeffffgggghhhhiiiijjjjkkkkllllmmmmnnnnoooopppp
15 int overflow2 = 0b11111111111111111111111111111111111111111111111111111111111111111L; // too long for long
16 float badfloat1 = 0b01.01; // no binary floats
17 float badfloat2 = 0b01e01; // no binary floats
18 }