diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2011-09-22 18:20:53 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2011-09-22 18:20:53 +0000 |
commit | 3acb1e03c47ef7fbba24da5a0f97a25f93e1f608 (patch) | |
tree | 452cb6bed78c47878202d2c61b8e1bb2c147c915 | |
parent | 63d045e14e1a5f89e97af66dba6166f434c18fcc (diff) | |
download | gcc-3acb1e03c47ef7fbba24da5a0f97a25f93e1f608.zip gcc-3acb1e03c47ef7fbba24da5a0f97a25f93e1f608.tar.gz gcc-3acb1e03c47ef7fbba24da5a0f97a25f93e1f608.tar.bz2 |
re PR c++/50371 ([C++0x] std::nullptr_t rejected as non-type template-parameter)
/cp
2011-09-22 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50371
* pt.c (invalid_nontype_parm_type_p): Handle NULLPTR_TYPE.
/testsuite
2011-09-22 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50371
* g++.dg/cpp0x/nullptr24.C: New.
From-SVN: r179096
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/pt.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/nullptr24.C | 5 |
4 files changed, 17 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 0dd01d9..8ec7a05 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2011-09-22 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/50371 + * pt.c (invalid_nontype_parm_type_p): Handle NULLPTR_TYPE. + 2011-09-22 Jonathan Wakely <jwakely.gcc@gmail.com> Paolo Carlini <paolo.carlini@oracle.com> diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index ee33daf..af5ca5c 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -18717,6 +18717,8 @@ invalid_nontype_parm_type_p (tree type, tsubst_flags_t complain) return 0; else if (TREE_CODE (type) == DECLTYPE_TYPE) return 0; + else if (TREE_CODE (type) == NULLPTR_TYPE) + return 0; if (complain & tf_error) error ("%q#T is not a valid type for a template constant parameter", type); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b9d638f..90fe936 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-09-22 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/50371 + * g++.dg/cpp0x/nullptr24.C: New. + 2011-09-22 Uros Bizjak <ubizjak@gmail.com> PR target/50482 diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr24.C b/gcc/testsuite/g++.dg/cpp0x/nullptr24.C new file mode 100644 index 0000000..f3917796 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/nullptr24.C @@ -0,0 +1,5 @@ +// PR c++/50371 +// { dg-options -std=c++0x } + +template<decltype(nullptr)> +struct nt; |