Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #147475

Re: Why does 'gcc -Wall' complain about void main() ?

Path csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.c
Subject Re: Why does 'gcc -Wall' complain about void main() ?
Date Fri, 01 Nov 2019 10:25:16 -0700
Organization None to speak of
Lines 14
Message-ID <lnk18j7blv.fsf@kst-u.example.com> (permalink)
References <5fXuF.717$gt2.335@fx02.iad>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 8bit
Injection-Info reader02.eternal-september.org; posting-host="bd2070be1949be0113457798c3cfb24b"; logging-data="1127"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18PsYj+HkgqaM8KeOXRW+tw"
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)
Cancel-Lock sha1:fLJy/cgb0rdP1Cl0ABQIytYamHE= sha1:fbhLLjZLrLTe3LWgWv58EVaB+wU=
Xref csiph.com comp.lang.c:147475

Show key headers only | View raw


DFS <nospam@dfs.com> writes:
> gcc 9.1.0 on MSYS2
>
> combinearrays.c:14:6: warning: return type of ‘main’ is not ‘int’ [-Wmain]
>     14 | void main() {
>        |      ^~~~

This newsgroup has an FAQ at <http://www.c-faq.com>.
Section 11 answers your question.

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Working, but not speaking, for Philips Healthcare
void Void(void) { Void(); } /* The recursive call of the void */

Back to comp.lang.c | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Why does 'gcc -Wall' complain about void main() ? DFS <nospam@dfs.com> - 2019-11-01 10:22 -0400
  Re: Why does 'gcc -Wall' complain about void main() ? David Brown <david.brown@hesbynett.no> - 2019-11-01 15:45 +0100
    Re: Why does 'gcc -Wall' complain about void main() ? Manfred <noname@add.invalid> - 2019-11-01 17:57 +0100
      Re: Why does 'gcc -Wall' complain about void main() ? Keith Thompson <kst-u@mib.org> - 2019-11-01 10:31 -0700
        Re: Why does 'gcc -Wall' complain about void main() ? Manfred <noname@add.invalid> - 2019-11-01 21:00 +0100
      Re: Why does 'gcc -Wall' complain about void main() ? David Brown <david.brown@hesbynett.no> - 2019-11-01 21:20 +0100
  Re: Why does 'gcc -Wall' complain about void main() ? Keith Thompson <kst-u@mib.org> - 2019-11-01 10:25 -0700

csiph-web