All of lore.kernel.org
 help / color / mirror / Atom feed
From: Baruch Siach <baruch@tkos.co.il>
To: buildroot@busybox.net
Subject: [Buildroot] Analysis results for 2018-10-09
Date: Thu, 11 Oct 2018 14:45:16 +0300	[thread overview]
Message-ID: <87k1molnar.fsf@tkos.co.il> (raw)
In-Reply-To: <875zy8spe0.fsf@dell.be.48ers.dk>

Hi Peter,

Peter Korsgaard writes:
>>>>>> "Baruch" == Baruch Siach <baruch@tkos.co.il> writes:
>  >> -typedef double hbase_f(double);
>  >> +typedef double (*hbase_f)(double);
>
>  > Wouldn't that make the definition 'hbase_f *val_in' a pointer to
>  > function pointer?
>
> Not in C at least. The syntax is:
>
> typedef <returntype> (*name)(<arguments>)
>
> https://stackoverflow.com/questions/1591361/understanding-typedefs-for-function-pointers-in-c

Correct. But consider the SO example code:

  typedef void (*SignalHandler)(int signum);

  extern SignalHandler signal(int signum, SignalHandler handler);

The 'handler' parameter of the signal() function is a pointer to a
function. However the definition

  SignalHandler *handler;

would create a pointer to a pointer. As I understand, this is not the
intention of the 'hbase_f *val_in' definition in the original code.

baruch

--
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

  reply	other threads:[~2018-10-11 11:45 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-10  6:00 [Buildroot] [autobuild.buildroot.net] Build results for 2018-10-09 Thomas Petazzoni
2018-10-10 15:48 ` [Buildroot] Analysis " Thomas Petazzoni
2018-10-10 16:28   ` Matthew Weber
2018-10-10 17:57     ` Fabrice Fontaine
2018-10-10 19:14       ` Thomas Petazzoni
2018-10-10 21:25         ` Matthew Weber
2018-10-11  6:50           ` Thomas Petazzoni
2018-10-11 13:35             ` Matthew Weber
2018-10-12  3:57             ` Matthew Weber
2018-10-12 14:16               ` Matthew Weber
2018-10-20 14:10                 ` Matthew Weber
2018-10-10 19:05     ` Thomas Petazzoni
2018-10-12 16:00     ` Matthew Weber
2018-10-10 21:30   ` Arnout Vandecappelle
2018-10-11  6:46     ` Thomas Petazzoni
2018-10-11  9:21     ` Peter Korsgaard
2018-10-11 21:32       ` Arnout Vandecappelle
2018-10-10 21:35   ` Arnout Vandecappelle
2018-10-12  6:54     ` Jörg Krause
2018-10-10 21:52   ` Christian Stewart
2018-10-10 21:54   ` Arnout Vandecappelle
2018-10-11  4:43   ` Baruch Siach
2018-10-11  6:53     ` Thomas Petazzoni
2018-10-11  9:48       ` Peter Korsgaard
2018-10-11 14:12         ` Thomas Petazzoni
2018-10-11 15:25           ` Peter Korsgaard
2018-10-11  8:39     ` Thomas Petazzoni
2018-10-11 10:42     ` Peter Korsgaard
2018-10-11 11:08       ` Baruch Siach
2018-10-11 11:18         ` Peter Korsgaard
2018-10-11 11:45           ` Baruch Siach [this message]
2018-10-11 12:46             ` Peter Korsgaard
2018-10-11 11:02   ` Giulio Benetti
2018-10-20 15:22     ` Giulio Benetti
2018-10-11 14:31   ` Frank Hunleth
2018-10-11 14:32     ` Thomas Petazzoni
2018-10-11 19:24   ` Giulio Benetti

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=87k1molnar.fsf@tkos.co.il \
    --to=baruch@tkos.co.il \
    --cc=buildroot@busybox.net \
    /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.