[cfe-dev] False positive warning: "warning: 'terminate:' is deprecated"?

Sean McBride sean at rogue-research.com
Mon Dec 12 10:17:35 PST 2011


Hi all,

With clang version 3.1 (trunk 146375) the code below generates a false positive warning:

test.m:7:6: warning: 'terminate:' is deprecated [-Wdeprecated-declarations]
    [NSApp terminate:nil];
     ^

As best as I can tell, that method is not deprecated.  The global variable NSApp is declared as 'id'.  If I cast it to NSApplication* the warning goes away.  This warning did not occur a few weeks ago, nor does it with gcc.

Is it a bug or am I missing something?

-----
#import <Cocoa/Cocoa.h>

int main (int argc, char *argv[])
{
	(void)argc; (void)argv;
	
 [NSApp terminate:nil];
	
	return 0;
}
-----

Cheers,

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada






More information about the cfe-dev mailing list