aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/pt.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r--gcc/cp/pt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 69c60b4..da3cd23 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -13829,6 +13829,7 @@ instantiate_decl (tree d, int defer_ok,
bool pattern_defined;
int need_push;
location_t saved_loc = input_location;
+ int saved_in_system_header = in_system_header;
bool external_p;
/* This function should only be used to instantiate templates for
@@ -13911,6 +13912,7 @@ instantiate_decl (tree d, int defer_ok,
mark_definable (d);
input_location = DECL_SOURCE_LOCATION (d);
+ in_system_header = DECL_IN_SYSTEM_HEADER (d);
/* If D is a member of an explicitly instantiated class template,
and no definition is available, treat it like an implicit
@@ -14178,6 +14180,7 @@ instantiate_decl (tree d, int defer_ok,
out:
input_location = saved_loc;
+ in_system_header = saved_in_system_header;
pop_deferring_access_checks ();
pop_tinst_level ();