On Wed, Jun 18, 2008 at 09:41:26AM -0700, Joe Buck wrote:
> On Tue, Jun 17, 2008 at 08:51:24PM -0700, Karen Shaeffer wrote:
> > I see your point. My sticking point is that the process is actually
> > running on a physical machine.
>
> And that's the problem. You, like many C programmers, have in
On Tue, Jun 17, 2008 at 08:51:24PM -0700, Karen Shaeffer wrote:
> I see your point. My sticking point is that the process is actually
> running on a physical machine.
And that's the problem. You, like many C programmers, have in your head a
physical machine model where pointer variables are physi
Hi,
Hahaha! I know, I have been getting an education here. I
really appreciate everyone's patience on this issue. I
have assimilated all the excellent comments and understand
my own laziness has caused my confusion. Thank you all.
Karen
On Wed, Jun 18, 2008 at 11:20:00AM +0100, Andrew Haley wrote:
Hi!
Karen Shaeffer wrote:
I see your point. My sticking point is that the process is actually
running on a physical machine. And the addresses, although virtual,
do translate to a unique physical memory location. And, the value
stored in that location cannot be 0 and 5 at the same time. And my
c
Karen Shaeffer wrote:
> On Tue, Jun 17, 2008 at 11:01:31AM -0700, Ian Lance Taylor wrote:
>>>
>>> output ~~
>>> $ const_ints
>>> const int ic = 0 *cip = 5 *ip = 5
>>> &ic = 0xbfbd72a0cip =
Hello Karen,
Tuesday, June 17, 2008, 10:38:20 PM, you wrote:
> Hi Ian, I can live with that. My problem was that the addresses
> cannot be correct. In my opinion, the undefined behavior should be
> limited to the value in the address or in some form of error. But to
> let the buggy code ex
Karen Shaeffer <[EMAIL PROTECTED]> writes:
> I see your point. My sticking point is that the process is actually
> running on a physical machine. And the addresses, although virtual,
> do translate to a unique physical memory location. And, the value
> stored in that location cannot be 0 and 5 at
On Tue, Jun 17, 2008 at 09:52:17PM -0400, Andrew Pinski wrote:
> On Tue, Jun 17, 2008 at 9:44 PM, Karen Shaeffer
> <[EMAIL PROTECTED]> wrote:
> > On Tue, Jun 17, 2008 at 11:01:31AM -0700, Ian Lance Taylor wrote:
> >> > output ~~
> >> > $ const_ints
> >>
On Tue, Jun 17, 2008 at 9:44 PM, Karen Shaeffer
<[EMAIL PROTECTED]> wrote:
> On Tue, Jun 17, 2008 at 11:01:31AM -0700, Ian Lance Taylor wrote:
>> > output ~~
>> > $ const_ints
>> > const int ic = 0 *cip = 5 *ip = 5
>> > &ic = 0xbfbd72a0cip = 0xbf
On Tue, Jun 17, 2008 at 11:01:31AM -0700, Ian Lance Taylor wrote:
> > output ~~
> > $ const_ints
> > const int ic = 0 *cip = 5 *ip = 5
> > &ic = 0xbfbd72a0cip = 0xbfbd72a0ip = 0xbfbd72a0
> > ~~
On Tue, Jun 17, 2008 at 11:01:31AM -0700, Ian Lance Taylor wrote:
> >
> > output ~~
> > $ const_ints
> > const int ic = 0 *cip = 5 *ip = 5
> > &ic = 0xbfbd72a0cip = 0xbfbd72a0ip = 0xbf
Karen Shaeffer <[EMAIL PROTECTED]> writes:
> int main(int argc, char * argv[]) {
> const int ic = 0;
> const int * cip;
> int * ip;
> cip =
> ip = (int *)cip;
> *ip = 5;
> printf("const int ic = %d *cip = %d *ip = %d\n", ic, *cip, *ip);
> printf("&ic = %pcip = %pip =
Hi,
I have stumbled upon a quirk that appears to me to be
illogical. Maybe someone can help me to understand this:
sample code ~
#include
const int gic = 0;
const int * gcip;
int * gip;
int main(int argc, char * argv[]) {
const int ic = 0;
const int
13 matches
Mail list logo