--- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-01
14:29 ---
(In reply to comment #14)
> > | > But it will not warn about this testcase as we have array[index] but
> > that
> is filed as PR 16202.
> > I don't think you're explaining that we cannot warn. Are you?
I
--- Additional Comments From algorithmus at gmail dot com 2005-07-01 12:42
---
> | > But it will not warn about this testcase as we have array[index] but that
is filed as PR 16202.
> I don't think you're explaining that we cannot warn. Are you?
I can't understand what Andrew means. I
--- Additional Comments From gdr at integrable-solutions dot net
2005-07-01 05:23 ---
Subject: Re: Incorrect work with multiple assigment.
"pinskia at gcc dot gnu dot org" <[EMAIL PROTECTED]> writes:
| (In reply to comment #11)
| > then reclassify the bug as missed warning, (not incor
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-01
05:13 ---
(In reply to comment #11)
> then reclassify the bug as missed warning, (not incorrect code).
Did you read my comment #8, which I referenced the bug about the warning:
> But it will not warn about this testca
--- Additional Comments From gdr at integrable-solutions dot net
2005-07-01 05:10 ---
Subject: Re: Incorrect work with multiple assigment.
"algorithmus at gmail dot com" <[EMAIL PROTECTED]> writes:
| (In reply to comment #9)
| >
| > Did you try -Wsequence-points (or similar)?
|
| ye
--- Additional Comments From algorithmus at gmail dot com 2005-07-01 05:04
---
(In reply to comment #9)
>
> Did you try -Wsequence-points (or similar)?
yeah. both -Wall and -Wsequence-points return nothing.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22248
--- Additional Comments From gdr at integrable-solutions dot net
2005-06-30 20:57 ---
Subject: Re: Incorrect work with multiple assigment.
"algorithmus at gmail dot com" <[EMAIL PROTECTED]> writes:
| I guess, it'll be useful if the developers add some warning message
| for similar-to-
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-30
18:31 ---
(In reply to comment #7)
> It's there: -Wsequence-point, which is also enabled by -Wall.
But it will not warn about this testcase as we have array[index] but that is
filed as PR 16202.
--
http://gcc.gn
--- Additional Comments From giovannibajo at libero dot it 2005-06-30
18:27 ---
It's there: -Wsequence-point, which is also enabled by -Wall.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22248
--- Additional Comments From algorithmus at gmail dot com 2005-06-30 18:21
---
thanks for your suggestions. I usually use STL. But I held training contest for
Ukrainian team before International Olympiad in Informatics and one guy's used
this swap macros that doesn't work at my compile
--- Additional Comments From giovannibajo at libero dot it 2005-06-30
17:58 ---
Also you could simply use std::swap as Gaby suggested.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22248
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-30
13:37 ---
Parentheses are not seqeunce points. The comma operator is though.
*** This bug has been marked as a duplicate of 11751 ***
--
What|Removed |Added
-
--- Additional Comments From algorithmus at gmail dot com 2005-06-30 13:35
---
no. I guess there is a problem.
just try this progam:
#include
#define swap(a,b) (a^=(b^=(a^=b)))
const int N = 2;
int a[N];
int main()
{
for(int i=0;ihttp://gcc.gnu.org/bugzilla/show_
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-30
13:26 ---
There is no sequence points between the assignments of a[i] so the loading of
a[i] can be evaluated in
any order.
You want to define swap as:
#define swap(a,b) do{ a^=b;b^=a;a^=b;}while(0)
This is a du
--- Additional Comments From gdr at integrable-solutions dot net
2005-06-30 13:19 ---
Subject: Re: New: Incorrect work with multiple assigment.
"algorithmus at gmail dot com" <[EMAIL PROTECTED]> writes:
| ---new.cpp
| #include
|
| #define swap(a,b) a^=b^=a^=b
You're modifying ob
15 matches
Mail list logo