Commit a1176db9 authored by nicola's avatar nicola
Browse files

In gcc/objc/:

2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.

        2006-03-10  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4407151
        * objc/objc-act.c (objc_is_class_name): template parameter is not
        an objective class name.
        (objc_generate_cxx_cdtors): Check for the null
        objc_implementation_context.

In gcc/testsuite/:
2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>

        Merge from 'apple/trunk' branch on FSF servers.

        2006-01-17  Fariborz Jahanian <fjahanian@apple.com>

        Radar 4407151
        * obj-c++.dg/template-7.mm: New.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165657 138bc75d-0d04-0410-961f-82ee72b054a4
parent dd26ec9b
2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
Merge from 'apple/trunk' branch on FSF servers.
2006-03-10 Fariborz Jahanian <fjahanian@apple.com>
Radar 4407151
* objc/objc-act.c (objc_is_class_name): template parameter is not
an objective class name.
(objc_generate_cxx_cdtors): Check for the null
objc_implementation_context.
2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
Merge from 'apple/trunk' branch on FSF servers.
2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
......
......@@ -3652,7 +3652,12 @@ objc_is_class_name (tree ident)
ident = OBJC_TYPE_NAME (ident);
#ifdef OBJCPLUS
if (ident && TREE_CODE (ident) == TYPE_DECL)
ident = DECL_NAME (ident);
{
tree type = TREE_TYPE (ident);
if (type && TREE_CODE (type) == TEMPLATE_TYPE_PARM)
return NULL_TREE;
ident = DECL_NAME (ident);
}
#endif
if (!ident || TREE_CODE (ident) != IDENTIFIER_NODE)
return NULL_TREE;
......@@ -5236,6 +5241,10 @@ objc_generate_cxx_cdtors (void)
bool need_ctor = false, need_dtor = false;
tree ivar;
/* Error case, due to possibly an extra @end. */
if (!objc_implementation_context)
return;
/* We do not want to do this for categories, since they do not have
their own ivars. */
......
2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
Merge from 'apple/trunk' branch on FSF servers.
2006-01-17 Fariborz Jahanian <fjahanian@apple.com>
Radar 4407151
* obj-c++.dg/template-7.mm: New.
2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/proto-qual-1.m: Adjust test for GNU runtime to match
......
// Test that objective-c++ does not confuse a template parameter named 'Object'
// with an interface of the same name.
// Author: Fariborz Jahanian <fjahanian@apple.com>
// { dg-do compile }
// { dg-options "" }
typedef struct objc_class *Class;
@interface Object
{
Class isa;
}
@end
template <class Object>
struct pyobject_type
{
static Object* checked_downcast(Object* x)
{
return x;
}
};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment