Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Fix configure test build errors with clang-15
- X-seq: zsh-workers 50639
- From: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: zsh-workers@xxxxxxx, Nicholas Vinson <nvinson234@xxxxxxxxx>
- Subject: Re: [PATCH] Fix configure test build errors with clang-15
- Date: Fri, 16 Sep 2022 08:40:44 +0200
- Archived-at: <https://zsh.org/workers/50639>
- In-reply-to: <CAH+w=7a8==WNxoCoV35WnLTzxW1B8De-JZ4vJaLBFvjk+OrixA@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <20220915023624.3384-1-nvinson234@gmail.com> <CAH+w=7a8==WNxoCoV35WnLTzxW1B8De-JZ4vJaLBFvjk+OrixA@mail.gmail.com>
On Fri, Sep 16, 2022 at 12:30 AM Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> On Wed, Sep 14, 2022 at 7:42 PM Nicholas Vinson <nvinson234@xxxxxxxxx> 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.
Roman.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author