This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Elementary question about complete_type vs tsubst_flags_t
- From: Paolo Carlini <paolo dot carlini at oracle dot com>
- To: "gcc at gnu dot org" <gcc at gnu dot org>
- Cc: Jason Merrill <jason at redhat dot com>
- Date: Fri, 10 Jul 2015 13:26:29 +0200
- Subject: Elementary question about complete_type vs tsubst_flags_t
- Authentication-results: sourceware.org; auth=none
Hi,
I have an old question about an issue which I noticed a while ago, and
for example clearly shows up in c++/62085: in a few places in pt.c we
call complete_type from functions getting a tsubst_flags_t. Clearly,
complete_type often calls instantiate_class_template_1, which, in turn,
often calls tsubst with an hard-coded tf_error. Thus possible errors
coming from an initial tf_none. As I said, c++/62085 would be a
straightforward example: tsubst_flags_t is tf_none when tsubst calls
complete_type at line #12527 (case TYPENAME_TYPE) and then things start
going wrong until an hard error from abstract_virtuals_error_sfinae.
Is there a general lesson about such uses of complete_type? Seem at
least brittle to me...
Thanks!
Paolo.