Re: how to define a function pointer variable witout typdef?



Keith Thompson wrote:
Joe Wright <joewwright@xxxxxxxxxxx> writes:

Keith Thompson wrote:

[snip]

Typedefs are a bit odd in that a typedef doesn't actually create a
new type, merely an alias for an existing type.  But a typedef is a
definition because the thing it creates is the alias, not the type.
And now we wait for the experts to point out my errors.


I suppose a typedef is not a definition. This because it does not create an object in memory. It's another case of C overloading the English language. Odd, isn't it that '#define X 2' is not a definition either.


No, it doesn't create an object in memory.  Neither does a function
definition.  A definition, as I understand it, is a declaration that
creates the named entity, rather than merely referring to an entity
that's created elsewhere.  The entity doesn't have to be an object.


Nice side step. In what way is a typedef a declaration creating a named entity?


--
Joe Wright                            mailto:joewwright@xxxxxxxxxxx
"Everything should be made as simple as possible, but not simpler."
                    --- Albert Einstein ---
.



Relevant Pages

  • Re: how to define a function pointer variable witout typdef?
    ... >> Typedefs are a bit odd in that a typedef doesn't actually create a ... >> definition because the thing it creates is the alias, ... Odd, isn't it that '#define X 2' is not a definition ... it doesn't create an object in memory. ...
    (comp.lang.c)
  • Re: Regarding typedef and macro
    ... For certain values of "proper". ... A typedef creates an alias for an ... Keith Thompson kst-u@xxxxxxx ...
    (comp.lang.c)
  • Re: (quickie) (Aliasing) Possible to get this to work in strict?
    ... Here it just copies the memory address. ... an alias remains an alias. ... the reference-count has gone up to 2. ... Aliases are a lot like hard links on Unices. ...
    (comp.lang.perl.misc)
  • Re: Unknown Wdf01000.sys error
    ... Please do not send e-mail directly to this alias. ... WdfObjectDelete to free that kind of memory. ... > Use!analyze -v to get detailed debugging information. ... > FOLLOWUP_NAME: MachineOwner ...
    (microsoft.public.development.device.drivers)
  • Re: Does Bill Gates know about the DDK regarding C++?
    ... you burn more memory by suballocating and also eliminate the ... usefulness of the verifier settings for catching memory overruns and ... Please do not send e-mail directly to this alias. ... the allocation is a pain but the containers and algortithms are ...
    (microsoft.public.development.device.drivers)