From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14324 invoked by alias); 28 Jan 2005 17:02:04 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 13928 invoked by uid 48); 28 Jan 2005 17:01:56 -0000 Date: Fri, 28 Jan 2005 17:02:00 -0000 Message-ID: <20050128170156.13926.qmail@sourceware.org> From: "bangerth at dealii dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050127222428.19661.yuri@tsoft.com> References: <20050127222428.19661.yuri@tsoft.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/19661] unnecessary atexit calls emitted for static objects with empty destructors X-Bugzilla-Reason: CC X-SW-Source: 2005-01/txt/msg04197.txt.bz2 List-Id: ------- Additional Comments From bangerth at dealii dot org 2005-01-28 17:01 ------- atexit only takes a pointer to a function to be run on exit of the program. The fact that this is an empty function is unbeknownst to it, and probably the code in the middle-end that has to deal with that. I therefore believe that the front-end has to take care of the fact that we have may run an empty function; it would also logically make sense to guard the call to atexit with a check whether the destructor is empty or not. I'll move this bug back to the C++ component. W. -- What |Removed |Added ---------------------------------------------------------------------------- Component|middle-end |c++ http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19661