From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 921 invoked by alias); 16 Mar 2010 09:14:17 -0000 Received: (qmail 912 invoked by uid 22791); 16 Mar 2010 09:14:17 -0000 X-SWARE-Spam-Status: No, hits=-3.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mathups.math.u-psud.fr (HELO matups.math.u-psud.fr) (129.175.52.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 16 Mar 2010 09:14:07 +0000 Received: from barah.math.u-psud.fr (barah.math.u-psud.fr [129.175.52.24]) by matups.math.u-psud.fr (Postfix) with ESMTP id BEC4C7551; Tue, 16 Mar 2010 10:14:05 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by barah.math.u-psud.fr (Postfix) with ESMTP id BC80D474120; Tue, 16 Mar 2010 10:14:05 +0100 (CET) Received: from barah.math.u-psud.fr ([127.0.0.1]) by localhost (barah.math.u-psud.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id B6yBQybfPlZK; Tue, 16 Mar 2010 10:14:04 +0100 (CET) Received: from [IPv6:::1] (topodyn-ng.math.u-psud.fr [129.175.50.33]) by barah.math.u-psud.fr (Postfix) with ESMTP id 81BA1474164; Tue, 16 Mar 2010 10:14:03 +0100 (CET) Message-ID: <4B9F4BDA.50101@free.fr> Date: Tue, 16 Mar 2010 09:21:00 -0000 From: Duncan Sands User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) Gecko/20100222 Thunderbird/3.0.1 MIME-Version: 1.0 To: Eric Botcazou CC: gcc-patches@gcc.gnu.org Subject: Re: [Ada] Delete bogus use of flag_zero_initialized_in_bss References: <4B9F3DA9.5020204@free.fr> <201003161003.14729.ebotcazou@adacore.com> In-Reply-To: <201003161003.14729.ebotcazou@adacore.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2010-03/txt/msg00653.txt.bz2 Hi Eric, >> The Ada front-end seems to think that clearing flag_zero_initialized_in_bss >> means that global variables without an explicit initializer will be >> considered to be uninitialized rather than zero initialized by the rest of >> the compiler. > > No, it doesn't, you misunderstood. > >> Rather than specifying whether the global will be zero initialized or not, >> it specifies by what method it will be zero initialized: whether by placing >> in the BSS section or by outputting an explicit block of zeros. > > Yes, that's precisely why the flag needs to be cleared: uninitialized really > means uninitialized in Ada so the BSS section isn't guaranteed to be zero-ed > at startup for a pure Ada program. on most systems (such as linux) it is the O/S that takes care of ensuring the BSS section is filled with zeros, so I don't see how being an Ada program is relevant. Ciao, Duncan.