re PR c++/51199 ([C++11][DR 547] gcc forms impossible types derived from function types with cv-qualifier-seq)

2014-05-12  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/51199
	* g++.dg/template/pr51199.C: New.

From-SVN: r210321
This commit is contained in:
Paolo Carlini 2014-05-12 08:42:41 +00:00 committed by Paolo Carlini
parent 481d8d7005
commit 713106ad88
2 changed files with 22 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2014-05-12 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51199
* g++.dg/template/pr51199.C: New.
2014-05-11 Hans-Peter Nilsson <hp@bitrange.com>
* gcc.c-torture/execute/20101011-1.c [__MMIX__] (DO_TEST): Define as 0.

View File

@ -0,0 +1,17 @@
// PR c++/51199
typedef void FC() const;
template<class T>
struct add_ref {
typedef T& type; // { dg-error "forming reference" }
};
typedef add_ref<FC>::type ref_type;
template<class T>
struct add_ptr {
typedef T* type; // { dg-error "forming pointer" }
};
typedef add_ptr<FC>::type ptr_type;