Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #45770

Re: Is this a compiler bug? (Function accepts *ptr when **ptr is specified)

From Ralf Damaschke <rwspam@gmx.de>
Newsgroups comp.lang.c
Subject Re: Is this a compiler bug? (Function accepts *ptr when **ptr is specified)
Date 2014-06-10 23:02 +0000
Organization C.H.A.O.S.
Message-ID <bvph4vFkcmhU1@mid.individual.net> (permalink)
References <p4pcp95g1suo33d9s89u212mv8belco8oe@4ax.com>

Show all headers | View raw


DSF wrote:

> typedef int (*RTFDPR)(int type, DWORD filecount, DWORD filesize);

> bool ReadTextFileCommon(TEXTFILEDATAA *tfd, int64 *filesize, void
> **filebuffer, void **progress);
> {
>   RTFDPR DisplayProgress;
> ...
> rtfdpr is the stub.
>   if(*progress == NULL)
>     *progress = rtfdpr;
>   DisplayProgress = *progress;
> ...
> }

>   Is there something I'm missing here, or is the compiler missing the
> error?

It seems to be missing a diagnostic required for the missing cast in
the last assignment above (and probably the second to last assignment,
too). Even with the cast the result may not be properly usable.

-- Ralf

Back to comp.lang.c | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Is this a compiler bug? (Function accepts *ptr when **ptr is specified) DSF <notavalid@address.here> - 2014-06-09 22:46 -0400
  Re: Is this a compiler bug? (Function accepts *ptr when **ptr is specified) Barry Schwarz <schwarzb@dqel.com> - 2014-06-09 21:16 -0700
  Re: Is this a compiler bug? (Function accepts *ptr when **ptr is specified) jt@toerring.de (Jens Thoms Toerring) - 2014-06-10 09:38 +0000
  Re: Is this a compiler bug? (Function accepts *ptr when **ptr is specified) Richard Damon <Richard@Damon-Family.org> - 2014-06-10 07:19 -0400
  Re: Is this a compiler bug? (Function accepts *ptr when **ptr is specified) Ralf Damaschke <rwspam@gmx.de> - 2014-06-10 23:02 +0000
  Re: Is this a compiler bug? (Function accepts *ptr when **ptr is specified) Ike Naar <ike@iceland.freeshell.org> - 2014-06-11 05:56 +0000
    Re: Is this a compiler bug? (Function accepts *ptr when **ptr is specified) gazelle@shell.xmission.com (Kenny McCormack) - 2014-06-11 09:39 +0000
  Re: Is this a compiler bug? (Function accepts *ptr when **ptr is specified) DSF <notavalid@address.here> - 2014-06-11 23:52 -0400
    Re: Is this a compiler bug? (Function accepts *ptr when **ptr is specified) Barry Schwarz <schwarzb@dqel.com> - 2014-06-11 22:38 -0700
    Re: Is this a compiler bug? (Function accepts *ptr when **ptr is specified) James Kuyper <jameskuyper@verizon.net> - 2014-06-12 07:45 -0400

csiph-web