On C-optimizing compilers removing code that has undefined behavior
1–10 of 71 posts
Re: On C-optimizing compilers removing code that has undefined behavior
#2Re: On C-optimizing compilers removing code that has undefined behavior
#3Re: On C-optimizing compilers removing code that has undefined behavior
#4What CPUs in common use still have trap representations? Are there other reasons why reading from an indeterminate value can't give an arbitrary but well-defined result?
Re: On C-optimizing compilers removing code that has undefined behavior
#5Then why not just write it like that? This is like deliberately shooting yourself in the foot and complaining that your shotgun works.
Re: On C-optimizing compilers removing code that has undefined behavior
#6Re: On C-optimizing compilers removing code that has undefined behavior
#7> The programmer has clearly attempted to set x[0]=0 Then why not just write it like that? This is like deliberately shooting yourself in the foot and complaining that your shotgun works.
Also, the article goes on to argue that uninitialized memory is used to seed random generators, which is generally undefined behavior. I don't think this should be a valid use-case.
Re: On C-optimizing compilers removing code that has undefined behavior
#8Perhaps the committee has been infiltrated by the Rust Evangelism Strikeforce?
Re: On C-optimizing compilers removing code that has undefined behavior
#9> The programmer has clearly attempted to set x[0]=0 Then why not just write it like that? This is like deliberately shooting yourself in the foot and complaining that your shotgun works.
Re: On C-optimizing compilers removing code that has undefined behavior
#10What CPUs in common use still have trap representations? Are there other reasons why reading from an indeterminate value can't give an arbitrary but well-defined result?