From: Joe Perches <joe@perches.com>
To: Jonathan Corbet <corbet@lwn.net>,
Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] docs: kernel-doc: fix parsing of function pointers
Date: Mon, 03 Sep 2018 15:28:10 -0700 [thread overview]
Message-ID: <6cfb25aff666e58a376303ce02de8caa481a6599.camel@perches.com> (raw)
In-Reply-To: <20180903153804.2b091448@lwn.net>
On Mon, 2018-09-03 at 15:38 -0600, Jonathan Corbet wrote:
> On Mon, 3 Sep 2018 22:29:00 +0200
> Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> > > > # pointer-to-function
> > > > $arg =~ tr/#/,/;
> > > > - $arg =~ m/[^\(]+\(\*?\s*([\w\.]*)\s*\)/;
> >
> > m/[^\(]+\(\*?\s*([\w\.]*)\s*\)/;
> > ^
> > Here we allow for 0..1 asterixes.
> >
> > If there is no asterix it is not a function pointer. Why should we care
> > for this case?
>
> GCC seems to allow that asterisk (asterix is an indomitable Gaul :) to be
> missing; not sure if that's officially allowed by the language or not. I
> also don't know if any code in the kernel elides it,
Many typedefs for function pointers do not use the *
Dunno if there are many others, I didn't look hard.
$ git grep -P '\w+\s*\*?\s*\(\s*\w+\w*\)\s*\(\w+' | \
grep -w typedef
next prev parent reply other threads:[~2018-09-03 22:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-03 18:41 [PATCH 1/1] docs: kernel-doc: fix parsing of function pointers Heinrich Schuchardt
2018-09-03 19:00 ` Jonathan Corbet
2018-09-03 20:29 ` Heinrich Schuchardt
2018-09-03 21:38 ` Jonathan Corbet
2018-09-03 22:28 ` Joe Perches [this message]
2018-09-03 22:54 ` Bernd Petrovitsch
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=6cfb25aff666e58a376303ce02de8caa481a6599.camel@perches.com \
--to=joe@perches.com \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=xypron.glpk@gmx.de \
/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