This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PR java/19070: Don't allow null v/s number comparisons


Hi,

  The following simple patch converts the ICE in PR 19070
into the syntax error that should have been shown.

GCJ currently allows this to pass:

  ...
  double snafu = 0.0;
  if (snafu != null)
  ...

The existing code used to allow a comparison to
pass if either operand is a NULL, when the right
thing in this case would be to allow it only if either 
both are NULL or one is a NULL and the other is 
a reference.

Tested on i686-pc-linux-gnu with Jacks included.
Causes no new failures but 8 XPASSes in Jacks.

OK for mainline?

Thanks,
Ranjit.

-- 
Ranjit Mathew      Email: rmathew AT gmail DOT com

Bangalore, INDIA.    Web: http://ranjitmathew.hostingzero.com/

Attachment: PR19070.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]