This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Re: dwarf2out change breaks ada and libstdc++ onsolaris too


On Tue, 3 Feb 2004 14:39:25 -0800, Devang Patel <dpatel@apple.com> wrote:

> On Feb 3, 2004, at 2:23 PM, Jason Merrill wrote:
>
>> On Tue, 3 Feb 2004 09:44:24 -0800, Devang Patel <dpatel@apple.com> wrote:
>>
>>> It seems I broke all targets that do not supply target specific
>>> routine to build builtin va_list. These targets use standard
>>> builtin va_list that is just void *.
>>
>> It's not clear to me why that's a problem.
>>>      /* For TYPE_DECL, lookup TREE_TYPE.  */
>>>      if (TREE_CODE (decl) == TYPE_DECL)
>>> !     {
>>> !       tree v = root_type (TREE_TYPE (decl));
>>> !       if (v && TREE_CODE (v) == VOID_TYPE)
>>> !       /* Can not force die VOID_TYPE.  */
>>> !       return;
>>> !       at_import_die = force_type_die (TREE_TYPE (decl));
>>> !     }
>>
>> Why is this necessary?  We can cope with void* in other contexts.
>
>    typedef __builtin_va_list __gnuc_va_list;
>    typedef __gnuc_va_list va_list;
>    namespace std
>    {
>      using ::va_list;
>    }
>
> base_type_die()  and add_type_attribute() do not generate DIE for
> VOID_TYPE. In other contexts we just don't generate DIE. Here we
> need DIE for DW_TAG_imported_decl. Which means force_type_die() fails.

You're missing my point.  Didn't you just say va_list is void*?  That's
different from plain void.

In any case, it's wrong to ignore the TYPE_DECL.  The decl is what we're
interested in.  We should be importing the appropriate typedef die.

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]