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


Groups > comp.lang.c > #13667

Re: Variable argument function as a parameter of a variable argument function

From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.c
Subject Re: Variable argument function as a parameter of a variable argument function
Date 2011-11-20 15:58 -0800
Organization None to speak of
Message-ID <lnaa7qwdm2.fsf@nuthaus.mib.org> (permalink)
References <00f0752d-f768-437a-87c5-0b3767c7411f@l24g2000yqm.googlegroups.com> <4EC94804.4E9F@mindspring.com> <e6730a8e-3cb9-49a5-aaaa-c7a36945474d@o1g2000vbe.googlegroups.com>

Show all headers | View raw


AikidoGuy <aikidoguy@gmail.com> writes:
> Indeed, FAQ 15.12 was not my question... but Pete's response has
> confirmed that my original question is possible. I was also
> considering to construct such an example, but with a new child, it is
> difficult to find time. Thanks for your help Pete!
>
> The motivation behind the original question was because my code was
> not working as expected and I thought that it might be due to the fact
> that maybe a variadic function inside another variadic function could
> be the cause of my problem. I thought to myself that perhaps a
> compiler could get confused (somehow extract the wrong elements off
> the stack for the internal variadic function ...). I see that my
> thoughts were incorrect. So, I have looked again at my code that
> prompted my original question and I found that I had a subtle bug in
> there... oops :(
>
> Thanks everyone for your answers and suggestions! Much appreciated :)

You've illustrated why it's a good idea to ask about the actual problem
you're having, rather than making an assumption about what caused the
problem and asking about that.

It's known as an "XY problem": "You want to do X, and you think Y is the
best way of doing so. Instead of asking about X, you ask about Y."
<http://www.perlmonks.org/?node_id=542341>

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

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


Thread

Variable argument function as a parameter of a variable argument function AikidoGuy <aikidoguy@gmail.com> - 2011-11-19 23:02 -0800
  Re: Variable argument function as a parameter of a variable argument function Ark <akhasin@macroexpressions.com> - 2011-11-20 03:14 -0500
  Re: Variable argument function as a parameter of a variable argument function Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-11-20 08:07 -0500
    Re: Variable argument function as a parameter of a variable argument function Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-11-20 08:11 -0500
  Re: Variable argument function as a parameter of a variable argument function Keith Thompson <kst-u@mib.org> - 2011-11-20 08:19 -0800
  Re: Variable argument function as a parameter of a variable argument function pete <pfiland@mindspring.com> - 2011-11-20 13:33 -0500
    Re: Variable argument function as a parameter of a variable argument function AikidoGuy <aikidoguy@gmail.com> - 2011-11-20 15:29 -0800
      Re: Variable argument function as a parameter of a variable argument function Keith Thompson <kst-u@mib.org> - 2011-11-20 15:58 -0800
        Re: Variable argument function as a parameter of a variable argument function AikidoGuy <aikidoguy@gmail.com> - 2011-11-20 16:05 -0800
          Re: Variable argument function as a parameter of a variable argument function James Kuyper <jameskuyper@verizon.net> - 2011-11-20 20:45 -0500
            Re: Variable argument function as a parameter of a variable argument function AikidoGuy <aikidoguy@gmail.com> - 2011-11-20 20:18 -0800
              Re: Variable argument function as a parameter of a variable argument function James Kuyper <jameskuyper@verizon.net> - 2011-11-21 07:22 -0500
                Re: Variable argument function as a parameter of a variable argument function Seebs <usenet-nospam@seebs.net> - 2011-11-21 22:43 +0000

csiph-web