public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Marek Polacek <polacek@redhat.com>
To: Tom Tromey <tom@tromey.com>
Cc: java-patches@gcc.gnu.org, GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [Java PATCH] Generate declarations in jvgenmain.c
Date: Tue, 07 Oct 2014 16:15:00 -0000	[thread overview]
Message-ID: <20141007161518.GI3503@redhat.com> (raw)
In-Reply-To: <87fvezrho1.fsf@tromey.com>

On Tue, Oct 07, 2014 at 10:03:26AM -0600, Tom Tromey wrote:
> >>>>> "Marek" == Marek Polacek <polacek@redhat.com> writes:
> 
> Marek> [CCing java-patches now]
> Marek> Java testsuite breaks with -std=gnu11 as a default and/or with 
> Marek> -Wimplicit-function-declaration on
> 
> I don't recall how one gets warnings when compiling this generated code,
> but if it is generally possible then I think this:

I'm not sure I understand, but this piece of code gets compiled when
running the libjava testsuite.  And when the warning triggers, we get
many fails.
 
> Marek> +  if (indirect)
> Marek> +    fprintf (stream, "extern void JvRunMainName ();\n");
> Marek> +  else
> Marek> +    fprintf (stream, "extern void JvRunMain ();\n");
> 
> ... will fail with -Wstrict-prototypes, since in C those should
> read "(void)" rather than "()".
> 
> If it's not possible then no big deal.

I saw declarations of JvRunMain{,Name} with no parameters and with
some parameters.  So I decided to make it prototype-less function
declaration for now.  I think we don't have to worry about
-Wstrict-prototypes for now.

	Marek

  reply	other threads:[~2014-10-07 16:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-07  8:31 Marek Polacek
2014-10-07 12:21 ` Andrew Haley
2014-10-07 16:03 ` Tom Tromey
2014-10-07 16:15   ` Marek Polacek [this message]
2014-10-07 16:41     ` Tom Tromey

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=20141007161518.GI3503@redhat.com \
    --to=polacek@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=java-patches@gcc.gnu.org \
    --cc=tom@tromey.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).