Groups | Search | Server Info | Login | Register
Groups > comp.lang.c > #397941
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Tim Rentsch <tr.17687@z991.linuxsc.com> |
| Newsgroups | comp.lang.c |
| Subject | Re: gcc and 'include' |
| Date | Sat, 25 Apr 2026 10:09:31 -0700 |
| Organization | A noiseless patient Spider |
| Lines | 27 |
| Message-ID | <86wlxv2chg.fsf@linuxsc.com> (permalink) |
| References | <10q4ceb$38i2d$1@dont-email.me> <87ikaiw5g0.fsf@example.invalid> <10q5nnr$3l3lc$1@dont-email.me> <87pl4pnotc.fsf@example.invalid> |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Injection-Date | Sat, 25 Apr 2026 17:09:32 +0000 (UTC) |
| Injection-Info | dont-email.me; posting-host="842c0705c388246dee2d3602366a27fb"; logging-data="1023732"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/AOpqjkYIqIPMQ082c3rKwbvUt5SK+Wtk=" |
| User-Agent | Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) |
| Cancel-Lock | sha1:wsGduzIrzAll9YwNCDLMN6McBfc= sha1:ASfHqkilSc3P4xPiHsWqYXH0tx8= |
| Xref | csiph.com comp.lang.c:397941 |
Show key headers only | View raw
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes: > Bart <bc@freeuk.com> writes: > >> On 26/03/2026 23:12, Keith Thompson wrote: > > [...] > >>> (Unless you're using a C23 compiler, I suggest "int F(void)" rather >>> than "int F()".) >> >> Nobody bothers with that any more. > > I presume that's meant to be hyperbole. Plenty of C programmers do > bother with that. > >> Most seem to assume that () already >> means zero parameters anyway, judging by the incorrect usage I >> constantly saw in open source code. > > I find it better to write correct code than to look for excuses > to write poor code. If I define a parameterless function F, I > absolutely want a diagnostic if I call it with one or more arguments. > If nothing else, it's an opportunity to set a good example. The declaration "int F();" is correct code. Just because you don't like it doesn't mean it's wrong.
Back to comp.lang.c | Previous | Next — Next in thread | Find similar
Re: gcc and 'include' Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-04-25 10:09 -0700 Re: gcc and 'include' Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-04-25 15:58 -0700
csiph-web