-funswitch-loops not effective?
Mark Mitchell
mark@codesourcery.com
Tue Jan 18 19:54:00 GMT 2005
Giovanni Bajo wrote:
> 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?
Yes -- but only during the constructor for Foo. After that point, it
cannot change.
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304
More information about the Gcc
mailing list