Hi,
On 19/07/2018 10:43, Rainer Orth wrote:
Hi Paolo,
the below resolves the bug report and its duplicates by implementing -
in a rather straightforward way, I believe - the resolution of DR 136,
which also made into C++17. Note that in the patch I used permerror instead
of a plain error for consistency with the other check
(check_redeclaration_no_default_args) which I added (rather) recently, and
I'm exploiting that to allow two existing testcases to compile as they
are. Tested x86_64-linux.
this patch caused
+FAIL: g++.old-deja/g++.mike/p784.C -std=gnu++11 (test for excess errors)
+FAIL: g++.old-deja/g++.mike/p784.C -std=gnu++14 (test for excess errors)
+FAIL: g++.old-deja/g++.mike/p784.C -std=gnu++98 (test for excess errors)
Excess errors:
/vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.old-deja/g++.mike/p784.C:1185:21: error:
friend declaration of 'String common_prefix(const String&, const String&, int)'
specifies default arguments and isn't a definition [-fpermissive]
/vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.old-deja/g++.mike/p784.C:1187:21: error:
friend declaration of 'String common_suffix(const String&, const String&, int)'
specifies default arguments and isn't a definition [-fpermissive]
/vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.old-deja/g++.mike/p784.C:1226:21: error:
friend declaration of 'int readline(istream&, String&, char, int)' specifies
default arguments and isn't a definition [-fpermissive]
I'm seeing it on i386-pc-solaris2.11 and sparc-sun-solaris2.11 with
-m32, but according to gcc-testresults it also happens on
i686-pc-linux-gnu, x86_64-pc-linux-gnu and a few others.
Thanks. I'm wondering why I didn't notice that. Anyway, I'm going to
simply add -fpermissive to this testcase too.
Thanks again,
Paolo.