Aw: Re: Warning: shared mutable data

2023-02-17 Thread Helmut Zeisel via Gcc
Von: "Jonathan Wakely"  > What exactly are you suggesting for the semantics of the warning? Good question. It is difficult to detect all suspiscious cases, but at least some of the can be defined: If we have a function prototype f(...,Ti xi,...Tj xj,...) and call the function f(... xi, ..

Re: Warning: shared mutable data

2023-02-17 Thread Jonathan Wakely via Gcc
On Fri, 17 Feb 2023, 13:15 Helmut Zeisel via Gcc, wrote: > Recently I read about Value-Oriented Programming > ( https://accu.org/journals/overload/31/173/teodorescu/ ) > There it is pointed out that sharing mutable data. i. e., code like > > my_push_back(vec, vec[0]); > > can lead to subtle error