public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Laurynas Biveinis <laurynas.biveinis@gmail.com>
To: jeremie.salvucci@free.fr
Cc: gcc <gcc@gcc.gnu.org>, basile <basile@starynkevitch.net>
Subject: Re: Gengtype : strange code in output_type_enum
Date: Fri, 27 Aug 2010 13:40:00 -0000	[thread overview]
Message-ID: <AANLkTi=XV_vf7kAGT4QFdHY_pm9B8QeZQaXbUTKnz0aZ@mail.gmail.com> (raw)
In-Reply-To: <1360893126.445931282912919305.JavaMail.root@zimbra30-e5.priv.proxad.net>

2010/8/27  <jeremie.salvucci@free.fr>:

> We think that the enum type_kind discriminates fields union in struct type. So for TYPE_PARAM_STRUCT we believe that
> the param_struct field of union u inside struct type is used. If this is true, the test s->u.s.line.file != NULL is meaningless when s->kind == TYPE_PARAM_STRUCT, it should be s->u.param_struct.line.file != NULL instead in our opinion.
>
>
> Or can a type have a kind TYPE_PARAM_STRUCT and only have s->u.s valid? It might be related to the code in new_structure near line  638 of gengtype.c which sets ls->kind = TYPE_LANG_STRUCT.
>
> Perhaps TYPE_PARAM_STRUCT has two different roles. If that is indeed the case, we have to distinguish them when serializing gengtype's state.

I don't have time to investigate this right now to come up with an
answer, but did you try producing gengtype debugging dump and looking
there for structs that have these combinations of properties?
Especially since -

> However, the existing code appears to work but we don't understand why.

Cheers,
-- 
Laurynas

  reply	other threads:[~2010-08-27 12:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-27 12:49 jeremie.salvucci
2010-08-27 13:40 ` Laurynas Biveinis [this message]
2010-08-27 13:44 ` jeremie.salvucci
2010-08-27 14:25   ` jeremie.salvucci
2010-08-27 14:43     ` Arnaud Charlet
2010-08-27 14:47     ` Laurynas Biveinis
2010-08-27 18:25       ` Basile Starynkevitch
2010-08-27 18:29         ` Ian Lance Taylor
2010-08-27 15:02 ` Ian Lance Taylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTi=XV_vf7kAGT4QFdHY_pm9B8QeZQaXbUTKnz0aZ@mail.gmail.com' \
    --to=laurynas.biveinis@gmail.com \
    --cc=basile@starynkevitch.net \
    --cc=gcc@gcc.gnu.org \
    --cc=jeremie.salvucci@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).