-funswitch-loops not effective?

Giovanni Bajo rasky@develer.com
Tue Jan 18 16:01:00 GMT 2005


Richard Guenther <richard.guenther@gmail.com> wrote:

> Of course, this doesn't say where there is the well-formed
> leak of a pointer to the const member in the class in the first
> place:
>
> class Foo {
> public:
>    Foo(bool b) : flag(b) {}
>    bool get() const { return flag; }
> private:
>    const bool flag;
> };
>
> Is there a well-formed way to write to Foo::flag?  Couldn't we
> detect that there isn't one?


I don't know of any. I do not agree with Andrew's objection to the missing
optimization which prompted your original post either, so I suggest you to
file one (or two?) bugreports about these issues.
-- 
Giovanni Bajo



More information about the Gcc mailing list