| Deutsch English Français Italiano |
|
<864j9sktqf.fsf@linuxsc.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch <tr.17687@z991.linuxsc.com> Newsgroups: comp.lang.c Subject: Re: Whaddaya think? Date: Sun, 16 Jun 2024 22:45:28 -0700 Organization: A noiseless patient Spider Lines: 29 Message-ID: <864j9sktqf.fsf@linuxsc.com> References: <666ded36$0$958$882e4bbb@reader.netnews.com> <87ed8x4zjl.fsf@nosuchdomain.example.com> <666f10b7$0$1412896$882e4bbb@reader.netnews.com> <v4o7om$er18$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Mon, 17 Jun 2024 07:45:29 +0200 (CEST) Injection-Info: dont-email.me; posting-host="692163eb8eeb93c0cba3302737714278"; logging-data="540667"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/FZidwpMv9CCB3leUWr0RaYZ0hpPEfA6I=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:En2fIj3SwayHAVgrdUaMqGy01S8= sha1:xHrJmfLxIIqQ+QMu2RRyfhLhFB0= Bytes: 2226 James Kuyper <jameskuyper@alumni.caltech.edu> writes: > On 6/16/24 12:20, DFS wrote: > >> On 6/15/2024 6:22 PM, Keith Thompson wrote: >> >>> DFS <nospam@dfs.com> writes: > > ... > >>>> return(0); >>> >>> A minor style point: a return statement doesn't require parentheses. >>> IMHO using parentheses make it look too much like a function call. I'd >>> write `return 0;`, or more likely I'd just omit it, since falling off >>> the end of main does an implicit `return 0;` (starting in C99). >> >> Can't omit it. It's required by my brain. > > The parentheses you're putting in are completely unrelated to the use of > parentheses in _Generic(), function calls, compound literals, > sizeof(type name), alignof(), _BitInt(), _Atomic(), typeof(), > typeof_unqual(), alignas(), function declarators, static_assert(), if(), > switch(for(), while(), do ... while(), function-like macro definitions > and invocations or cast expressions. In all of those cases, the > parentheses are part of the grammar. [...] I'm pretty sure the "it" in "Can't omit it" was meant to refer to having the return statement, not to the parentheses.