C++ PATCH for c++/38256 (operator auto)

Mark Mitchell mark@codesourcery.com
Thu Dec 4 18:58:00 GMT 2008


Jason Merrill wrote:
> As I look at various issues around issuing semantic errors that might be
> detected during tentative parsing, it seems to me that it's
> inappropriate to do semantic processing during a tentative parse: we
> should just examine the syntax, and defer any semantic processing until
> we decide that the tentative parse is correct.

That's abstractly correct.

However, it's OK to issue an error during a tentative parse if we know
that no definite parse could possibly make the construct valid.  If we
do that, though, then we should commit to the tentative parse, so that
we don't issue the error more than once.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713



More information about the Gcc-patches mailing list