This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PR c++/71251] out-of-range parms in tmpl arg substitution


On Sat, Mar 17, 2018 at 8:13 AM, Alexandre Oliva <aoliva@redhat.com> wrote:
> As we go through each of the template parameters, substituting it with
> corresponding template arguments, an incorrect argument list might
> cause us to index argument vectors past their length (or fail in the
> preceding tree checks).  Avoid such dereferences and instead issue an
> error (if requested) if we find the argument index to be past the
> parameter vector length.

Any time we hit this abort, it indicates a bug in earlier processing,
so that we're looking up a template parameter in an argument list for
a different template.  Aborting in that situation is appropriate; it
has revealed many bugs.

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]