From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26703 invoked by alias); 14 Sep 2010 22:52:40 -0000 Received: (qmail 26687 invoked by uid 48); 14 Sep 2010 22:52:30 -0000 Date: Tue, 14 Sep 2010 22:52:00 -0000 Message-ID: <20100914225230.26686.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug objc/32995] False warning when implementing an instance method called `dealloc' In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "nicola at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-09/txt/msg01674.txt.bz2 ------- Comment #3 from nicola at gcc dot gnu dot org 2010-09-14 22:52 ------- If you want to use dealloc for "compatibility" with Apple Cocoa / GNUstep Base, then you also want the warnings that dealloc needs to include a call to [super dealloc], so I wouldn't change the compiler ;-) You could change your code though - if you're triyng to be compatible with Cocoa / GNUstep, then you may as well define an NSObject root class and have a dealloc method in it ;-) If you still want to use Object, you can add a -dealloc method to Object by using a category: @interface Object (dealloc) - (void) dealloc; @end (the add the implementation). Then you can have the missing [super dealloc] in your subclass, and the compiler won't generate any warnings. Thanks -- nicola at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |WONTFIX http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32995