Re: difference
From: nospam (h.b.furuseth(nospam)_at_usit.uio(nospam).no)
Date: 02/01/04
- Next message: nospam: "Re: difference"
- Previous message: CBFalconer: "OT: C perfomance"
- Next in thread: nospam: "Re: difference"
- Maybe reply: nospam: "Re: difference"
- Maybe reply: E. Robert Tisdale: "Re: difference"
- Maybe reply: pete: "Re: difference"
- Reply: Joe Wright: "Re: difference"
- Maybe reply: Richard Bos: "Re: difference"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 01 Feb 2004 05:33:33 +0100
Joe Wright wrote:
>Hallvard B Furuseth wrote:
>> I think integer constants are objects, and that what this text refers
>> to is lvalues like *p where p points to freed memory. That freed
>> memory is no longer an object.
>>
> From K&R2 A4 p195
> "An object, sometimes called a variable, is a location in storage, and
> its interpretation depends on two main attributes: its 'storage class'
> and its 'type'."..
>
> That doesn't sound like a constant to me. I must have missed something
> important earlier.
What you missed is that C is defined by the C standard, not by K&R2.
The sentence you quoted illustrates why: It is wrong. It says that all
objects are variables. So malloced memory, which is not a variable, is
not an object.
> Give me an example of an integer constant that you
> think is an object. Please.
1
-- Hallvard
- Next message: nospam: "Re: difference"
- Previous message: CBFalconer: "OT: C perfomance"
- Next in thread: nospam: "Re: difference"
- Maybe reply: nospam: "Re: difference"
- Maybe reply: E. Robert Tisdale: "Re: difference"
- Maybe reply: pete: "Re: difference"
- Reply: Joe Wright: "Re: difference"
- Maybe reply: Richard Bos: "Re: difference"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|