This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/19661] unnecessary atexit calls emitted for static objects with empty destructors
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jan 2005 17:01:56 -0000
- Subject: [Bug c++/19661] unnecessary atexit calls emitted for static objects with empty destructors
- References: <20050127222428.19661.yuri@tsoft.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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