linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: _z33 <timid.Gentoo@gmail.com>
To: linux-c-programming@vger.kernel.org
Subject: Re: typecasting - explain
Date: Fri, 09 Sep 2005 15:34:59 +0530	[thread overview]
Message-ID: <dfrmoh$qqb$1@sea.gmane.org> (raw)
In-Reply-To: <dfrkke$k2t$1@sea.gmane.org>

Jarmo wrote:
> 
> Functions are only "jump" labels. Thou you cant expect a program to work 
> if you cross typecast functions with different argument (or return) 
> values. This because the function expects arguments to be in "right" 
> register or stack position. And caller expects return values to be in 
> right register.
> 
> // Jarmo

excerpt from a discussion here @

...
   ANSI Classic section 3.3.4, page 47 lines 4 to 5:  "A pointer to a
function of one type may be converted to a pointer to a function of another
type and back again; the result shall compare equal to the original 
pointer."
...


   Seems to confuse me a lot. I didn't understand the ABC's of the 
quoted discussion; nevertheless, this line there in the discussion, 
still stings me :(
   What does it mean?

   First of all, why should be function pointers be typecasted to 
something else?

_z33
-- 
I love TUX; well... that's an understatement :)


  reply	other threads:[~2005-09-09 10:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-09 19:46 typecasting - explain _z33
2005-09-09  7:33 ` kaushal
2005-09-09  8:48   ` _z33
2005-09-09  9:28     ` Jarmo
2005-09-09 10:04       ` _z33 [this message]
2005-09-09 13:19         ` Glynn Clements
2005-09-09  9:46 ` Steve Graegert
2005-09-09 10:22   ` _z33
2005-09-09 10:49     ` Steve Graegert
2005-09-09 11:10       ` _z33
2005-09-09 11:29         ` Steve Graegert
2005-09-09 13:17 ` Glynn Clements

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='dfrmoh$qqb$1@sea.gmane.org' \
    --to=timid.gentoo@gmail.com \
    --cc=linux-c-programming@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).