> To the best of my knowledge this:
> int b[2] = {0xf0, 0x0f};
> int i=0;
> int t = b[i++] | b[i++];
>
> Will evaluate to t=0xf0 and i=2.
The result is undefined:
1. Stroustrup:
http://www.research.att.com/~bs/bs_faq2.html#evaluation-order
2. C FAQ section 3.2:
http://www.faqs.org/faqs/C-faq/f
erators.
> -Original Message-
> From: David Landwehr [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 09, 2005 10:25 AM
> To: security-dev@xml.apache.org
> Subject: RE: Bug in XSCryptCryptoBase64.cpp
>
> To the best of my knowledge this:
> int b[2] = {0xf0, 0x0f};
&g
To the best of my knowledge this:
int b[2] = {0xf0, 0x0f};
int i=0;
int t = b[i++] | b[i++];
Will evaluate to t=0xf0 and i=2.
/David
-Original Message-
From: Milan Tomic [mailto:[EMAIL PROTECTED]
Sent: 9. marts 2005 07:26
To: security-dev@xml.apache.org
Subject: RE: Bug in
Hi,
I remember I have reported this long time ago and I am surprised that
fix is not in the CVS. The problem is not in [] operator, but order of
execution (from left to right or from right to left) is not defined in
C++ specification for | operator and it is left to compiler to decide
should right