Christopher Blizzard wrote:
> Bradley Baetz wrote:
>
>>>> A number of compilers have options to make virtual method tables follow
>>>> the Microsoft COM layout (which is documented in the COM Specification),
>>>> so I suppose that Mozilla should use these options as much as possible
>>>> (it is usually an attribute that you give to a parent-less class and
>>>> which is inherited).
>>>
>>>
>>> Is there a option for this in gcc? bbaetz?
>>>
>>
>>
>> I don't think so, but I really haven't looked.
>
>
> No, there isn't. We're essentially screwed.
>
Hmm, here's what I see in the GCC 3.1 sources:
/* Handle a "com_interface" attribute; arguments as in
struct attribute_spec.handler. */
static tree
handle_com_interface_attribute (node, name, args, flags, no_add_attrs)
tree *node;
tree name;
tree args ATTRIBUTE_UNUSED;
int flags ATTRIBUTE_UNUSED;
bool *no_add_attrs;
{
static int warned;
*no_add_attrs = true;
if (DECL_P (*node)
|| !CLASS_TYPE_P (*node)
|| *node != TYPE_MAIN_VARIANT (*node))
{
warning ("`%s' attribute can only be applied to class definitions",
IDENTIFIER_POINTER (name));
return NULL_TREE;
}
if (!warned++)
warning ("`%s' is obsolete; g++ vtables are now COM-compatible by
default",
IDENTIFIER_POINTER (name));
return NULL_TREE;
}