public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Using g++ to build java?
@ 2003-04-02  9:18 Kaveh R. Ghazi
  2003-04-02 18:08 ` Tom Tromey
  0 siblings, 1 reply; 3+ messages in thread
From: Kaveh R. Ghazi @ 2003-04-02  9:18 UTC (permalink / raw)
  To: gcc, java; +Cc: mark

So, did we come to a conclusion about whether to use C++ in Java and
how to accomplish it while bootstrapping?  IMHO, the easiest solution
is to arrange to compile g++ during stage1 so we are free to use it in
stage2 and later for building other languages.

Since we can rely on ISO C now, our first step is to get rid of gcc
extensions in the g++ frontend.  To achieve this and to ensure it
remains so, it means we have to build cc1plus with -pedantic and
squelch any problems.

I tried it and got these warnings:

 > % .../contrib/warn_summary -cp output.log
 > Counting warnings in the gcc/cp subdirectory,
 > there are 1014 warnings in stage3 of this bootstrap.
 > 
 > [...]
 > 
 > Number of warning types:
 >  713 ISO C forbids braced-groups within expressions
 >  216 bit-field `???' type invalid in ISO C
 >   55 comma at end of enumerator list
 >   11 ISO C forbids use of conditional expressions as lvalues
 >    8 ??? format, ??? arg (arg ???)
 >    7 `return' with a value, in function returning void
 >    4 ISO C does not allow extra `???' outside of a function

These all look like simple (i.e. obvious one-line) fixes.  The high
number results from headers repeatedly included.  I.e. we don't
actually have to fix 1000 spots. :-)

Are there any objections to proceeding?  If we're concerned about
diverging from 3.3 and creating merge conflicts, I believe all of
these changes will be so simple that we could safely put them in both
mainline and branch.  I.e. we're talking about e.g. adding
`__extension__' or removing extra commas, etc.

Once we get these fixed, I can test building cc1plus using solaris2
and irix6 cc to ensure it works with ISO C compilers.

		--Kaveh
--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu

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

* Re: Using g++ to build java?
  2003-04-02  9:18 Using g++ to build java? Kaveh R. Ghazi
@ 2003-04-02 18:08 ` Tom Tromey
  2003-04-02 23:17   ` Kaveh R. Ghazi
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2003-04-02 18:08 UTC (permalink / raw)
  To: Kaveh R. Ghazi; +Cc: mark, GCC Hackers

>>>>> "Kaveh" == Kaveh R Ghazi <ghazi@caip.rutgers.edu> writes:

Kaveh> So, did we come to a conclusion about whether to use C++ in Java and
Kaveh> how to accomplish it while bootstrapping?

Kaveh> Are there any objections to proceeding?  If we're concerned about
Kaveh> diverging from 3.3 and creating merge conflicts, I believe all of
Kaveh> these changes will be so simple that we could safely put them in both
Kaveh> mainline and branch.

FWIW, I haven't been able to find the time to work on merging the
libgcj verifier back into gcj.  This certainly won't happen for 3.3.
So perhaps the divergence isn't an issue.

Tom

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

* Re: Using g++ to build java?
  2003-04-02 18:08 ` Tom Tromey
@ 2003-04-02 23:17   ` Kaveh R. Ghazi
  0 siblings, 0 replies; 3+ messages in thread
From: Kaveh R. Ghazi @ 2003-04-02 23:17 UTC (permalink / raw)
  To: tromey; +Cc: gcc, java, mark

 > From: Tom Tromey <tromey@redhat.com>
 > 
 > >>>>> "Kaveh" == Kaveh R Ghazi <ghazi@caip.rutgers.edu> writes:
 > 
 > Kaveh> So, did we come to a conclusion about whether to use C++ in Java and
 > Kaveh> how to accomplish it while bootstrapping?
 > 
 > Kaveh> Are there any objections to proceeding?  If we're concerned about
 > Kaveh> diverging from 3.3 and creating merge conflicts, I believe all of
 > Kaveh> these changes will be so simple that we could safely put them in both
 > Kaveh> mainline and branch.
 > 
 > FWIW, I haven't been able to find the time to work on merging the
 > libgcj verifier back into gcj.  This certainly won't happen for 3.3.
 > So perhaps the divergence isn't an issue.
 > Tom

Divergence (between mainline and 3.3 cc1plus) would be an issue if I
worked on it now in preparation for your future effort.

Being bored, I went ahead and fixed all of the cc1plus -pedantic
warnings except for one type (which turned out to require some extra
poking to fix.)

I'll submit them in a little while.

		--Kaveh
--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu

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

end of thread, other threads:[~2003-04-02 22:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-02  9:18 Using g++ to build java? Kaveh R. Ghazi
2003-04-02 18:08 ` Tom Tromey
2003-04-02 23:17   ` Kaveh R. Ghazi

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