All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Corbet <corbet@lwn.net>
To: 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, 3 Sep 2018 15:38:04 -0600	[thread overview]
Message-ID: <20180903153804.2b091448@lwn.net> (raw)
In-Reply-To: <b0bff870-c3c1-20e8-6609-f93f59da8624@gmx.de>

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, but *somebody* at
some point made it optional, presumably with some reason.  It would be
instructive to take out that "?" and see what changes happen in a docs
build; I'll try to find a moment to do that.

jon

  reply	other threads:[~2018-09-03 21:38 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 [this message]
2018-09-03 22:28       ` Joe Perches
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=20180903153804.2b091448@lwn.net \
    --to=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.