[C++ PATCH] [PR87768] do not suppress location wrappers when tsubsting

Jason Merrill jason@redhat.com
Wed Jan 2 21:41:00 GMT 2019


On 12/30/18 11:31 PM, Alexandre Oliva wrote:
> Concepts-checking and other kinds of early tsubsting may often take
> place while location wrappers are suppressed, e.g. because we've
> triggered template instantiation within template parameter lists.
> 
> With that, exprs that are usually wrapped by VIEW_CONVERT_EXPRs
> location wrappers may end up wrapped by NON_LVALUE_EXPRs that are not
> marked as location wrappers.  If such NON_LVALUE_EXPRs tsubsted exprs
> undergo another round of tsubsting, say for constraint checking, or
> even for another round of specialization, they will be rejected by
> tsubst_copy_and_build.

> This patch introduces a sentinel to reset suppress_location_wrappers
> to zero, and uses it for template class and decl instantiation,
> including constraint checking.

Instead of a new class, let's add this to saved_scope and 
push_to/pop_from_top_level.

Jason



More information about the Gcc-patches mailing list