This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug objc/32995] New: False warning when implementing an instance method called `dealloc'
- From: "vgeddes at gnome dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Aug 2007 13:53:52 -0000
- Subject: [Bug objc/32995] New: False warning when implementing an instance method called `dealloc'
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
uname -a:
Linux ubuntu 2.6.20-16-generic #2 SMP Thu Jun 7 19:00:28 UTC 2007 x86_64
GNU/Linux
gcc -v:
Target: x86_64-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-mpfr --enable-checking=release
x86_64-linux-gnu
Thread model: posix
gcc version 4.1.2 (Ubuntu 4.1.2-0ubuntu4)
command line and warning:
gcc -DHAVE_CONFIG_H -I. -I.. -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED
-DGDK_PIXBUF_DISABLE_DEPRECATED -DGCONF_DISABLE_DEPRECATED
-DGNOME_VFS_DISABLE_DEPRECATED -DLIBGLADE_DISABLE_DEPRECATED
-DPANGO_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DPNG_NO_MMX_CODE
-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0
-I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12
-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-sign-compare
-fconstant-string-class=IString -fobjc-exceptions -g -O2 -MT
libobjective_gnome_1_0_la-IObject.lo -MD -MP -MF
.deps/libobjective_gnome_1_0_la-IObject.Tpo -c IObject.m -fPIC -DPIC -o
.libs/libobjective_gnome_1_0_la-IObject.o
IObject.m:65: warning: method possibly missing a [super dealloc] call
I have implemented an object `IObject' which subclasses the `Object' class
included the default Objective-C GNU runtime.
For stylistic compatibility with the Cocoa and GNUstep frameworks, I have
implemented a method called `dealloc' on `IObject'. `Object' does not define
this method.
When compiling this `IObject', I get this warning:
IObject.m:18: warning: method possibly missing a [super dealloc] call
Now, there is no `dealloc' method on `Object', so the warning is false. I
understand that the warning makes sense when using Cocoa or GNUstep, because
their root objects all have `dealloc' defined. But this is not the case for the
default GNU runtime.
Maybe we should define `dealloc' on `Object'?
--
Summary: False warning when implementing an instance method
called `dealloc'
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: objc
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: vgeddes at gnome dot org
GCC target triplet: x86_64-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32995