--- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-19
14:40 ---
Suspending based on comment #9.
--
What|Removed |Added
Status|NEW
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-19
14:40 ---
Confirmed, but ...
--
What|Removed |Added
Status|UNCONFIRMED |NE
--- Additional Comments From joseph at codesourcery dot com 2004-12-03
20:52 ---
Subject: Re: Incorrect reinitialization of compound literal
On Fri, 3 Dec 2004, austern at apple dot com wrote:
> I don't think this is the most natural interpretation. The line
> p = &((int) {1});
> s
--- Additional Comments From austern at apple dot com 2004-12-03 20:22
---
I don't think this is the most natural interpretation. The line
p = &((int) {1});
sets p to the address of the literal, and at the point we reach it for the
second time the literal itself has
been changed.
I
--- Additional Comments From joseph at codesourcery dot com 2004-12-03
19:28 ---
Subject: Re: Incorrect reinitialization of compound literal
On Fri, 3 Dec 2004, austern at apple dot com wrote:
> Not exactly. We still point to the same (one-element) array of ints we
> did before. Th
--- Additional Comments From austern at apple dot com 2004-12-03 19:27
---
Subject: Re: Incorrect reinitialization of compound literal
On Dec 3, 2004, at 11:15 AM, pinskia at gcc dot gnu dot org wrote:
>
> --- Additional Comments From pinskia at gcc dot gnu dot org
> 2004-12-03
--- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-03
19:15 ---
(In reply to comment #4)
> Subject: Re: Incorrect reinitialization of compound literal
>
> On Dec 3, 2004, at 10:50 AM, pinskia at gcc dot gnu dot org wrote:
>
> >
> > --- Additional Comments From pin
--- Additional Comments From austern at apple dot com 2004-12-03 18:59
---
Subject: Re: Incorrect reinitialization of compound literal
On Dec 3, 2004, at 10:50 AM, pinskia at gcc dot gnu dot org wrote:
>
> --- Additional Comments From pinskia at gcc dot gnu dot org
> 2004-12-03
--- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-03
18:52 ---
And it says it always return 1.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18814
--- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-03
18:51 ---
Just for reference this is the example from the text:
struct s { int i; };
int f (void)
{
struct s *p = 0, *q;
int j = 0;
again:
q=p,p=&((struct s){ j++ });
if (j < 2) goto again;
return p == q &
--- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-03
18:50 ---
But reading 6.5.2.5 P 16 seems to say something different.
What it seems to say is:
p = &((int) {1});
is to set the int to be one and then take the address. We still point to the
same int as before.
--
11 matches
Mail list logo