[Bug objc/47070] New: Error message mentioning _OBJC_INSTANCE_0
nicola at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Dec 27 17:33:00 GMT 2010
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47070
Summary: Error message mentioning _OBJC_INSTANCE_0
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: trivial
Priority: P3
Component: objc
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: nicola@gcc.gnu.org
The following testcase --
#include <objc/NXConstStr.h>
int main (void)
{
if (@"Test")
return 0;
return 1;
}
when compiled with the GNU runtime,
gcc test.m -lobjc -fgnu-runtime -Wall
produces an error message which is correct, but confusing for users --
test.m: In function ‘main’:
test.m:5:7: warning: the address of ‘_OBJC_INSTANCE_0’ will always evaluate as
‘true’ [-Waddress]
The error message is confusing because _OBJC_INSTANCE_0 is the internal name
used for @"Test".
Thanks
More information about the Gcc-bugs
mailing list