public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu>
To: gcc@gcc.gnu.org, java@gcc.gnu.org
Cc: mark@codesourcery.com
Subject: Using g++ to build java?
Date: Wed, 02 Apr 2003 09:18:00 -0000	[thread overview]
Message-ID: <200304020250.VAA12000@caip.rutgers.edu> (raw)

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

             reply	other threads:[~2003-04-02  2:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-02  9:18 Kaveh R. Ghazi [this message]
2003-04-02 18:08 ` Tom Tromey
2003-04-02 23:17   ` Kaveh R. Ghazi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200304020250.VAA12000@caip.rutgers.edu \
    --to=ghazi@caip.rutgers.edu \
    --cc=gcc@gcc.gnu.org \
    --cc=java@gcc.gnu.org \
    --cc=mark@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).