This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH 00/89] Compile-time gimple-checking
- From: Jeff Law <law at redhat dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>, Richard Sandiford <rdsandiford at googlemail dot com>, David Malcolm <dmalcolm at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 30 Apr 2014 15:26:35 -0600
- Subject: Re: [PATCH 00/89] Compile-time gimple-checking
- Authentication-results: sourceware.org; auth=none
- References: <1398099480-49147-1-git-send-email-dmalcolm at redhat dot com> <877g6hhjti dot fsf at talisman dot default> <1398186366 dot 26834 dot 95 dot camel at surprise> <87lhuxfb0n dot fsf at talisman dot default> <ac354302-43e9-4ecb-9706-662814a77982 at email dot android dot com> <CAFiYyc3cMpgyCNK6pbeNAgUfSHd=0MZP-M1CGOCkqwtnm2tVuw at mail dot gmail dot com> <CAFiYyc2=uNwYchErrjwVbB7=9cZuE9MmxgZ475zQi8Ns6omTnQ at mail dot gmail dot com>
On 04/23/14 08:32, Richard Biener wrote:
Also I see you introduce a const_FOO class with every FOO one.
I wonder whether, now that we have C++, can address const-correctness
in a less awkward way than with a typedef. Can you try to go back
in time and see why we did with that in the first place? ISTR that
it was "oh, if we were only using C++ we wouldn't need to jump through
To followup myself here, it's because 'tree' is a typedef to a pointer
and thus 'const tree' is different from 'const tree_node *'.
Not sure why we re-introduced the 'mistake' of making 'tree' a pointer
when we introduced 'gimple'. If we were to make 'gimple' the class
type itself we can use gimple *, const gimple * and also const gimple &
(when a NULL pointer is not expected).
It wasn't ever really discussed to the best of my recollection.
Yea, can't argue with that. However, do we want to ask David to fix up
the gimple vs gimple * vs const gimple * vs const gimple & as a
prerequisite for this patchset or are you comfortable going forward with
the patchset, then researching if there's a cleaner way to handle the
Anyway, gazillion new typedefs are ugly :/ (typedefs are ugly)