aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2015-06-29 22:02:08 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2015-06-29 22:02:08 +0000
commit71506d4107f7cf3eef78bb9fa9743b7765e43fd9 (patch)
tree5ace469b20bf63e5cea574c3b8fbc3b4c957673d /gcc/cp
parent9b552079a19f94b589458f8bdc62a15a27523748 (diff)
downloadgcc-71506d4107f7cf3eef78bb9fa9743b7765e43fd9.zip
gcc-71506d4107f7cf3eef78bb9fa9743b7765e43fd9.tar.gz
gcc-71506d4107f7cf3eef78bb9fa9743b7765e43fd9.tar.bz2
re PR c++/65977 (Constexpr should be allowed in declaration of friend template specialization)
/cp 2015-06-29 Paolo Carlini <paolo.carlini@oracle.com> PR c++/65977 * decl.c (grokfndecl): Allow constexpr declarations of friend template specializations. /testsuite 2015-06-29 Paolo Carlini <paolo.carlini@oracle.com> PR c++/65977 * g++.dg/cpp0x/constexpr-friend-3.C: New. * g++.dg/cpp0x/constexpr-friend-2.C: Adjust. From-SVN: r225148
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/decl.c15
2 files changed, 12 insertions, 9 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index aad780f..843b7ed 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2015-06-29 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/65977
+ * decl.c (grokfndecl): Allow constexpr declarations of friend
+ template specializations.
+
2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR fortran/66605
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 3f1cd34..5a644d7 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -7738,15 +7738,12 @@ grokfndecl (tree ctype,
}
if (inlinep & 1)
- error ("%<inline%> is not allowed in declaration of friend "
- "template specialization %qD",
- decl);
- if (inlinep & 2)
- error ("%<constexpr%> is not allowed in declaration of friend "
- "template specialization %qD",
- decl);
- if (inlinep)
- return NULL_TREE;
+ {
+ error ("%<inline%> is not allowed in declaration of friend "
+ "template specialization %qD",
+ decl);
+ return NULL_TREE;
+ }
}
}