public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* java/5519: add some dummy checking to compilation phase
@ 2002-01-28 15:06 nferrier
  0 siblings, 0 replies; only message in thread
From: nferrier @ 2002-01-28 15:06 UTC (permalink / raw)
  To: gcc-gnats


>Number:         5519
>Category:       java
>Synopsis:       add some dummy checking to compilation phase
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 28 15:06:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Nic Ferrier
>Release:        n/a
>Organization:
>Environment:
n/a
>Description:
GCC will do dummy checking, eg: reporting suspicious casts and so forth. It would be really useful if the Java compiler did something similar.

For example, I have a blind spot about comparing references for equality, eg:

  Long l1 = new Long(10);
  Long l2 = new Long(10);
  if (l1 == l2)
    System.out.println("ha!");

I'd like to be able to pass a flag to the compiler to get it to report this suspicious comparison.

I'm sure that each Java programmer can think of their own "idiot traps".
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-01-28 23:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-28 15:06 java/5519: add some dummy checking to compilation phase nferrier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).