From: "Satyam Sharma" <satyam.sharma@gmail.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: "Robert P. J. Day" <rpjday@mindspring.com>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
"Ralf Baechle" <ralf@linux-mips.org>
Subject: Re: [PATCH] MIPS: Transform old-style macros to newer "__noreturn" standard.
Date: Sat, 26 May 2007 04:05:46 +0530 [thread overview]
Message-ID: <a781481a0705251535g27bd38a5s496cc7b44f2d45d5@mail.gmail.com> (raw)
In-Reply-To: <4657626B.7010204@zytor.com>
On 5/26/07, H. Peter Anvin <hpa@zytor.com> wrote:
> Satyam Sharma wrote:
> >
> > But __attribute__((noreturn)) is simply a _function attribute_. Of course,
> > it is legal / valid only for functions with return-type void, so it does
> > make
> > sense to combine both void and __attribute__((noreturn)) in the same
> > macro like you say. But that's not syntactically necessary. In fact,
> > grepping through the sources, a lot of people do prefer to place the
> > attribute _after_ the function declarator.
> >
> > Anyway, I'm fine either way.
> >
>
> Sorry to say, but weren't you the person who didn't recognize !! as the
> idiomatic booleanizing operator?
Yes, of course, please prove a link / connection between that and this?
> I think you need to learn that everything that the compiler accepts
> isn't necessarily idiomatic, readable code. Consider
> __attribute__((noreturn)); it's a nonstandard feature implemented using
> a generic gcc mechanism -- thus what the compiler will accept is quite
> flexible, because it's a generic building block. It doesn't mean it's a
> good idea.
>
> The reason it's often written at the end of the expression mostly has to
> do with bugs in some very early versions of gcc.
That might be, but I was only saying that there is no syntactical
*compulsion* to combine the attribute with the return type. As for what's
readable, it is subjective. And as for what's common / standard / idiomatic
in the kernel code as of today, nothing beats a grep. Anyway, as I said
previously, I'm fine with either way.
Satyam
next prev parent reply other threads:[~2007-05-25 22:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-25 18:32 Robert P. J. Day
2007-05-25 18:40 ` H. Peter Anvin
2007-05-25 19:04 ` Robert P. J. Day
2007-05-25 19:38 ` H. Peter Anvin
2007-05-25 21:10 ` Robert P. J. Day
2007-05-25 21:43 ` H. Peter Anvin
2007-05-25 22:16 ` Satyam Sharma
2007-05-25 22:25 ` H. Peter Anvin
2007-05-25 22:35 ` Satyam Sharma [this message]
2007-05-25 22:46 ` H. Peter Anvin
2007-05-25 22:56 ` Satyam Sharma
2007-05-26 13:33 ` Robert P. J. Day
2007-05-26 18:10 ` H. Peter Anvin
2007-05-26 23:29 ` H. Peter Anvin
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a781481a0705251535g27bd38a5s496cc7b44f2d45d5@mail.gmail.com \
--to=satyam.sharma@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ralf@linux-mips.org \
--cc=rpjday@mindspring.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®