On 03/20/2015 10:53 AM, Kai Tietz wrote:
* tree.c (strip_typedefs): Ignore alignment
difference during processing template.
+ || (processing_template_decl
+ && TYPE_ALIGN (t) != TYPE_ALIGN (result)))
Your change is actually ignoring alignment differences when *not*
processing a template, which isn't what we want.
The problem is that the type is considered dependent in a template but
is not actually dependent, so we can see the exact same type outside a
template and it's not dependent. So, this code is creating the difference:
/* We can only call value_dependent_expression_p on integral constant
expressions; treat non-constant expressions as dependent, too. */
if (processing_template_decl
&& (type_dependent_expression_p (size)
|| !TREE_CONSTANT (size) || value_dependent_expression_p (size)))
Now that we have instantiation_dependent_expression_p, we should be able
to use that instead of checking type/value dependency separately.
Jason