> C Assignment Operators > An assignment operation assigns the value of the right-hand operand to the storage location named by the left-hand operand. Therefore, the left-hand operand of an assignment operation must be a modifiable l-value. After the assignment, an assignment expression has the value of the left operand but is not an l-va
バグ持ちから解放されるのか・・・ (スコア:1)
#性懲りもなく初物買いしたりして。
バグのないCPUなんて、バグのないプログラムのようなものだ (スコア:0)
Re: (スコア:1, 興味深い)
Re: (スコア:3, 参考になる)
インテル本家のチップはBCD演算補正命令の動作にバグがあり、
NECは当初そのバグを修正した互換チップであるμPD8080Aを発売したのですが、
ソフトウェアの互換性が無くなるというのが不評で、
結局バグも再現したインテル完全互換のμPD8080AFを発売する羽目になりました…
Re: (スコア:0)
int a;
volatile int b;
void test(){ a=b=0;}
で、aが0に初期化されない。コンパイラーのバグだ!って
bに代入した結果が0になるとは限らないし、その結果をaに代入するからというと、
変な仕様、バグを仕様にしたんだなって、また、理解の仕方が代入は分けないとバグになるっと
そして、他人のプログラムの問題ない代入でも指摘して、代入わけたほうがいいよ
かなり、略してますが、こんな人がいました。
Re: (スコア:0)
あれ? そうなの?
Re:バグのないCPUなんて、バグのないプログラムのようなものだ (スコア:0)
それでも、b = 0の式としての値は0なので、aには0が代入されるはずですが。
Re: (スコア:0)
こんなコードになりました。
b = 0; a = b;
ということなので、gcc の実装を信じる限りは「b =
Re: (スコア:0)
http://msdn.microsoft.com/ja-jp/library/474dd6e2(VS.80).aspx [microsoft.com]
> C Assignment Operators
> An assignment operation assigns the value of the right-hand operand to the storage location named by the left-hand operand. Therefore, the left-hand operand of an assignment operation must be a modifiable l-value. After the assignment, an assignment expression has the value of the left operand but is not an l-va