The following code is invalid as implicitly converting a long to int could
result in the value being truncated. However, GCJ accepts this code.

public class Arraybound
{
  public byte[] x(long l)
  {
    return new byte[l];
  }
}

-- 
           Summary: Invalid long to int promotion permitted in array
                    initializer
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mckinlay at redhat dot com
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20977

Reply via email to