Commit ac5f3b67 by Jason Merrill Committed by Jason Merrill

decl2.c (mark_used): Don't instantiate anything if skip_evaluation.

        * decl2.c (mark_used): Don't instantiate anything if
        skip_evaluation.

From-SVN: r65642
parent 7344f3d7
2003-04-15 Jason Merrill <jason@redhat.com>
* decl2.c (mark_used): Don't instantiate anything if
skip_evaluation.
2003-04-14 Ziemowit Laski <zlaski@apple.com>
* tree.c (build_cplus_array_type_1): Do not call
......
......@@ -4536,16 +4536,15 @@ void
mark_used (tree decl)
{
TREE_USED (decl) = 1;
if (processing_template_decl)
if (processing_template_decl || skip_evaluation)
return;
if (TREE_CODE (decl) == FUNCTION_DECL && DECL_DECLARED_INLINE_P (decl)
&& !TREE_ASM_WRITTEN (decl))
/* Remember it, so we can check it was defined. */
defer_fn (decl);
if (!skip_evaluation)
assemble_external (decl);
assemble_external (decl);
/* Is it a synthesized method that needs to be synthesized? */
if (TREE_CODE (decl) == FUNCTION_DECL
......
// The call to f is not potentially evaluated (3.2), so f<int> is not used,
// so it should not be instantiated.
template <class T>
T f (T)
{
typename T::X x;
}
int main()
{
int i = sizeof (f(0));
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment