https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122055

Harald van Dijk <harald at gigawatt dot nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |harald at gigawatt dot nl

--- Comment #3 from Harald van Dijk <harald at gigawatt dot nl> ---
(In reply to David Malcolm from comment #2)
> I've not seen self-initialization used to suppress "may be used
> uninitialized" in this way before.  Is there a style guide somewhere
> recommending this?

I'm unable to find it clearly mentioned as such in the current documentation
but it is a very longstanding GCC extension and it's referred to as such in
bugs dating back over 20 years, e.g. in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=5582#c2:

>  Sure. IIRC the extension is that this reliably calms down warnings about 
>  uninitialized variables.

In the current documentation, it's sort of implied by the fact that
-Wuninitialized does not turn on -Winit-self automatically.

Reply via email to