public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: java/2370: Behavior of main compilation without  --main is unfriendly
@ 2003-05-12 18:19 Dara Hazeghi
  0 siblings, 0 replies; 2+ messages in thread
From: Dara Hazeghi @ 2003-05-12 18:19 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR java/2370; it has been noted by GNATS.

From: Dara Hazeghi <dhazeghi@yahoo.com>
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: java/2370: Behavior of main compilation without  --main is unfriendly
Date: Mon, 12 May 2003 11:03:47 -0700

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit- 
 trail&database=gcc&pr=2370
 
 Hans Boehm say:
 
 "I originally filed 2370.  I also think that one needs to remain open.
 But it's clearly an RFE, not a bug report."
 
 This report should remain open.
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

* java/2370: Behavior of main compilation without  --main is unfriendly
@ 2001-03-23 15:56 Hans_Boehm
  0 siblings, 0 replies; 2+ messages in thread
From: Hans_Boehm @ 2001-03-23 15:56 UTC (permalink / raw)
  To: gcc-gnats; +Cc: tromey

>Number:         2370
>Category:       java
>Synopsis:       Behavior of main compilation without  --main is unfriendly
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 23 15:56:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Hans Boehm
>Release:        gcc 3.0
>Organization:
>Environment:
All
>Description:
Currently if gcj is asked to link a program with no --main specified, it will blindly proceed, thus guaranteeing a moderatwly obscure linker error message in response to a simple compilation attempt like

gcj X.java

Since most naive users are likely to try invoking it this way first, it would be really nice if it were a bit friendlier.

Based on a brief discussion on the Java mailing list, there seems to be some tentative agreement that:

If the only file arguments are .java and .class files, and there is no --main:
  1) If there is exactly one file argument, generate the --main
  2) If there is more than one, issue a warning, suggesting --main.  (This gets a little tricky if there are nonstandard libraries involved, which might be hiding main.  If none are explicitly listed, a warning should certainly be safe.)

Per Bothner pointed out that simply issuing an error if the linker was invoked without --main would not be appropriate once C++ main programs are better supported with Java code.

Tom expressed some concerns about implied options.  I wouldn't be at all opposed if this were not officially supported, and even in case 1 we issued a warning, but then did the right thing anyway.  I think in case there really is only one "right thing".  And it's important to do that, since it determines whether most user's first attempt to use gcj succeeds or fails.  The warning would simultaneously teach users the proper way to invoke gcj for larger applications.
>How-To-Repeat:
gcj hello.java
>Fix:

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-05-12 18:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-12 18:19 java/2370: Behavior of main compilation without --main is unfriendly Dara Hazeghi
  -- strict thread matches above, loose matches on Subject: below --
2001-03-23 15:56 Hans_Boehm

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).