summaryrefslogtreecommitdiffstats
path: root/gcc/cp/pt.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r--gcc/cp/pt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 9926f3d834f..32222705f8e 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -14588,8 +14588,8 @@ do_decl_instantiation (tree decl, tree storage)
;
else if (storage == ridpointers[(int) RID_EXTERN])
{
- if (pedantic && !in_system_header)
- pedwarn ("ISO C++ forbids the use of %<extern%> on explicit "
+ if (pedantic && !in_system_header && (cxx_dialect == cxx98))
+ pedwarn ("ISO C++ 1998 forbids the use of %<extern%> on explicit "
"instantiations");
extern_p = 1;
}
OpenPOWER on IntegriCloud