From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21459 invoked by alias); 11 Oct 2013 23:57:24 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 21447 invoked by uid 89); 11 Oct 2013 23:57:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-oa0-f53.google.com Received: from mail-oa0-f53.google.com (HELO mail-oa0-f53.google.com) (209.85.219.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 11 Oct 2013 23:57:23 +0000 Received: by mail-oa0-f53.google.com with SMTP id i7so2963949oag.12 for ; Fri, 11 Oct 2013 16:57:21 -0700 (PDT) X-Received: by 10.182.121.137 with SMTP id lk9mr16490858obb.32.1381535840971; Fri, 11 Oct 2013 16:57:20 -0700 (PDT) Received: from ian.penurio.us (pool-71-252-233-155.dllstx.fios.verizon.net. [71.252.233.155]) by mx.google.com with ESMTPSA id rr6sm99057581oeb.0.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 11 Oct 2013 16:57:20 -0700 (PDT) Message-ID: <5258905F.4090903@gmail.com> Date: Fri, 11 Oct 2013 23:57:00 -0000 From: Ian Pilcher User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: gcc-help@gcc.gnu.org Subject: Informing gcc that a function initializes a pointer target Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00025.txt.bz2 I've run into a situation where I'm getting a spurious (I think) "may be used uninitialized" warning. https://bugzilla.redhat.com/show_bug.cgi?id=1018422 In this case, the variable is initialized when its address is passed to another function. This situation made me wonder if there's some sort of function (or parameter) attribute that I could use to inform the compiler that the function does, in fact, initialize the variable. Thanks! -- ======================================================================== Ian Pilcher arequipeno@gmail.com Sometimes there's nothing left to do but crash and burn...or die trying. ========================================================================