Re: Expected warning maybe-uninitialized does not appear using g++13.2.0?

2023-12-21 Thread Marc Glisse via Gcc
On Thu, 21 Dec 2023, David Malcolm via Gcc wrote: On Wed, 2023-12-20 at 11:16 -0800, Eric Batchelor wrote: Hello, I unintentionally stumbled upon some strange behaviour that occurred due to a typo. I reproduced the behaviour where an object (std::string in my case) can be passed to a function

Re: Expected warning maybe-uninitialized does not appear using g++13.2.0?

2023-12-21 Thread David Malcolm via Gcc
On Wed, 2023-12-20 at 11:16 -0800, Eric Batchelor wrote: > Hello, I unintentionally stumbled upon some strange behaviour that > occurred due to a typo. > I reproduced the behaviour where an object (std::string in my case) > can > be passed to a function by reference, uninitialized, WITHOUT a >

Expected warning maybe-uninitialized does not appear using g++13.2.0?

2023-12-20 Thread Eric Batchelor
Hello, I unintentionally stumbled upon some strange behaviour that occurred due to a typo. I reproduced the behaviour where an object (std::string in my case) can be passed to a function by reference, uninitialized, WITHOUT a compiler warning. Changing the code to pass the object by value DOES