This is the mail archive of the
mailing list for the GCC project.
Re: [C++ PATCH] Core issue #226: Default template arguments in function templates
Doug Gregor wrote:
If we're not in C++0x mode (flag_cpp0x) and the user tried to provide
a default template argument in a function template, TREE_PURPOSE will
be error_mark_node (that's set in check_default_tmpl_args when it
emits an error). So, the behavior will be the same whether or not we
check flag_cpp0x here. The danger is if we somehow missed a case in
check_default_tmpl_args (or it isn't getting called somewhere), in
which case we would silently permit C++0x behavior under -std=c++98.
ok, can you note in the comment that T_P will be NULL or error_mark_node for
!flag_cpp0, so we don't need to restrict this to c++0x only code?
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery
email@example.com :: http://www.planetfall.pwp.blueyonder.co.uk