This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix some blockers of PR c++/24666 (arrays decay to pointers too early)


On Thu, 17 Dec 2015, Paolo Carlini wrote:

Hi,

On 16/12/2015 23:10, Patrick Palka wrote:
gcc/cp/ChangeLog:

    PR c++/59878
    * typeck.c (convert_for_initialization): Don't perform an early
    decaying conversion if converting to a class type.

gcc/testsuite/ChangeLog:

    PR c++/59878
    * g++.dg/conversion/pr59878.C: New test.
Nit: note that the actual bug number is 59879, not 59878. Can you please correct all those 8 to 9?

Sorry about that... Going to correct this with the following patch after
a quick regtest:

--- 8< ---

Subject: [PATCH] Fix wrong PR references

PR c++/59878 -> PR c++/59879
---
 gcc/cp/ChangeLog                          |  2 +-
 gcc/testsuite/ChangeLog                   |  4 ++--
 gcc/testsuite/g++.dg/conversion/pr59878.C | 25 -------------------------
 gcc/testsuite/g++.dg/conversion/pr59879.C | 25 +++++++++++++++++++++++++
 4 files changed, 28 insertions(+), 28 deletions(-)
 delete mode 100644 gcc/testsuite/g++.dg/conversion/pr59878.C
 create mode 100644 gcc/testsuite/g++.dg/conversion/pr59879.C

diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 14292e9..a192f00 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -2,7 +2,7 @@

 	PR c++/16333
 	PR c++/41426
-	PR c++/59878
+	PR c++/59879
 	PR c++/66895
 	* typeck.c (convert_for_initialization): Don't perform an early
 	decaying conversion if converting to a class type.
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index fafa8cc..7386f6b 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -37,11 +37,11 @@

 	PR c++/16333
 	PR c++/41426
-	PR c++/59878
+	PR c++/59879
 	PR c++/66895
 	* g++.dg/conversion/pr16333.C: New test.
 	* g++.dg/conversion/pr41426.C: New test.
-	* g++.dg/conversion/pr59878.C: New test.
+	* g++.dg/conversion/pr59879.C: New test.
 	* g++.dg/conversion/pr66895.C: New test.

 2015-12-16  Martin Sebor  <msebor@redhat.com>
diff --git a/gcc/testsuite/g++.dg/conversion/pr59878.C b/gcc/testsuite/g++.dg/conversion/pr59878.C
deleted file mode 100644
index ed567fe..0000000
--- a/gcc/testsuite/g++.dg/conversion/pr59878.C
+++ /dev/null
@@ -1,25 +0,0 @@
-// PR c++/59878
-
-struct Test {
- template <int N>
- Test(const char (&array)[N]) {}
-};
-
-Test test() {
- return "test1";
-}
-
-void test2(Test arg = "test12") {}
-
-template <typename T>
-void test3(T arg = "test123") {}
-
-template <typename T>
-void test4(const T &arg = "test123") {}
-
-int main() {
- test();
- test2();
- test3<Test>();
- test4<Test>();
-}
diff --git a/gcc/testsuite/g++.dg/conversion/pr59879.C b/gcc/testsuite/g++.dg/conversion/pr59879.C
new file mode 100644
index 0000000..7bd5b99
--- /dev/null
+++ b/gcc/testsuite/g++.dg/conversion/pr59879.C
@@ -0,0 +1,25 @@
+// PR c++/59879
+
+struct Test {
+ template <int N>
+ Test(const char (&array)[N]) {}
+};
+
+Test test() {
+ return "test1";
+}
+
+void test2(Test arg = "test12") {}
+
+template <typename T>
+void test3(T arg = "test123") {}
+
+template <typename T>
+void test4(const T &arg = "test123") {}
+
+int main() {
+ test();
+ test2();
+ test3<Test>();
+ test4<Test>();
+}
--
2.7.0.rc0.50.g1470d8f.dirty


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]