public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: Jonathan Wakely <jwakely@redhat.com>,
	Andrew Haley <aph@redhat.com>,
		"gcc@gcc.gnu.org" <gcc@gcc.gnu.org>
Subject: Re: [RFC] Deprecate "implicit int" for main() in C++
Date: Tue, 08 May 2018 11:39:00 -0000	[thread overview]
Message-ID: <CAH6eHdT2sXeez5TsGJhjThZK1TVBDuvLTb7V+0obnbCd9BAmng@mail.gmail.com> (raw)
In-Reply-To: <1eda6680-f574-7637-42dd-4309dacb012e@redhat.com>

On 8 May 2018 at 12:35, Florian Weimer wrote:
> On 04/25/2018 04:40 PM, Jonathan Wakely wrote:
>>
>> More concretely, deprecating it for a few releases would allow us to
>> apply the attached patch at some point in the future, so that instead
>> of:
>>
>> rt.c:1:6: warning: ISO C++ forbids declaration of ‘main’ with no type
>> [-Wreturn-type]
>> main() { return 0; }
>>       ^
>>
>> We'd get:
>>
>> rt.c:1:6: error: ISO C++ forbids declaration of 'main' with no type
>> [-fpermissive]
>> main() { return 0; }
>>       ^
>
>
> I wonder if it's currently a warning because the implicit int is used in
> configure checks.  If this is the case, maybe we cannot make it an error
> without altering the result of configure tests?

Sigh, you're probably right. Since GCC 8.1 any such configure tests
will get a warning (or an error with -Werror) so maybe they'll
eventually get fixed.

Jason already expressed a preference for not making the change anyway.

  reply	other threads:[~2018-05-08 11:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-25 13:12 Jonathan Wakely
2018-04-25 13:57 ` Andrew Haley
2018-04-25 13:59   ` Jason Merrill
2018-04-25 14:04     ` Andrew Haley
2018-04-25 14:40       ` Jonathan Wakely
2018-04-25 15:48         ` Andrew Haley
2018-04-25 16:22           ` Jonathan Wakely
2018-04-25 16:45             ` David Malcolm
2018-04-25 17:13               ` Jonathan Wakely
2018-04-25 17:50                 ` Nathan Sidwell
2018-04-25 21:14                   ` Jonathan Wakely
2018-04-25 15:31   ` Jonathan Wakely
2018-04-25 15:54     ` Jason Merrill
2018-05-08 11:36     ` Florian Weimer
2018-05-08 11:39       ` Jonathan Wakely [this message]
2018-05-08 12:02       ` Andreas Schwab

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=CAH6eHdT2sXeez5TsGJhjThZK1TVBDuvLTb7V+0obnbCd9BAmng@mail.gmail.com \
    --to=jwakely.gcc@gmail.com \
    --cc=aph@redhat.com \
    --cc=fweimer@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=jwakely@redhat.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).