help / color / mirror / code / Atom feed
From: Roman Perepelitsa <roman.perepelitsa@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: zsh-workers@zsh.org, Nicholas Vinson <nvinson234@gmail.com>
Subject: Re: [PATCH] Fix configure test build errors with clang-15
Date: Fri, 16 Sep 2022 08:40:44 +0200	[thread overview]
Message-ID: <CAN=4vMqq9LPBSPy3GNmb5Vg2ver2Bhsn3z-qFO1czgkt37yPhA@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7a8==WNxoCoV35WnLTzxW1B8De-JZ4vJaLBFvjk+OrixA@mail.gmail.com>

On Fri, Sep 16, 2022 at 12:30 AM Bart Schaefer
<schaefer@brasslantern.com> wrote:
> On Wed, Sep 14, 2022 at 7:42 PM Nicholas Vinson <nvinson234@gmail.com> wrote:
> >
> > When building with clang-15.0.0, I discovered several configure tests
> > incorrectly fail because clang-15.0.0 errors with messages similar to:
> >
> >     "error: type specifier missing, defaults to 'int'"
> For zsh-workers -- do we need to worry that these changed declarations
> themselves need to be conditionalized somehow, that is, are other
> compilers going to fail because of "int main()" when they expect "void
> main()"?

"void main()" has been invalid C and "int main()" valid C since the
very first standard. There are no C compilers that reject the latter.

Note that this patch is replacing "main()" (no type specifier at all)
with "int main()". The new code will work everywhere.


  parent reply	other threads:[~2022-09-16  6:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-15  2:36 Nicholas Vinson
2022-09-15 22:29 ` Bart Schaefer
2022-09-16  5:49   ` Jun T
2022-09-16  6:40   ` Roman Perepelitsa [this message]
2022-09-16  9:33 ` Jun T
2022-09-16 11:58   ` Nicholas Vinson

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:

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

  git send-email \
    --in-reply-to='CAN=4vMqq9LPBSPy3GNmb5Vg2ver2Bhsn3z-qFO1czgkt37yPhA@mail.gmail.com' \
    --to=roman.perepelitsa@gmail.com \
    --cc=nvinson234@gmail.com \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \


* 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.
Code repositories for project(s) associated with this public inbox


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 NNTP newsgroup(s).