From: Mikhail Maltsev <maltsevm@gmail.com>
To: Christophe Lyon <christophe.lyon@linaro.org>,
Jason Merrill <jason@redhat.com>
Cc: gcc-patches <gcc-patches@gnu.org>, Marek Polacek <polacek@redhat.com>
Subject: Re: [Patch, C++, PR65882] Check tf_warning flag in build_new_op_1
Date: Wed, 24 Jun 2015 20:39:00 -0000 [thread overview]
Message-ID: <558B12F2.7000602@gmail.com> (raw)
In-Reply-To: <CAKdteOYV4kPqq8ADKNf2d6F+yZb23PM5An_O6OuDcE_d0OfRYg@mail.gmail.com>
On 06/24/2015 06:52 PM, Christophe Lyon wrote:
> Hi Mikhail,
>
> In the gcc-5-branch, I can see that your new inhibit-warn-2.C test
> fails (targets ARM and AArch64).
>
> I can see this error message in g++.log:
> /aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/testsuite/g++.dg/diagnostic/inhibit-warn-2.C:
> In function 'void fn1()':
> /aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/testsuite/g++.dg/diagnostic/inhibit-warn-2.C:29:3:
> error: 'typename A<(F<typename C< <template-parameter-1-1>
>> ::type>::value || B:: value)>::type D::operator=(Expr) [with Expr =
> int; typename A<(F<typename C< <template-parameter-1-1>
>> ::type>::value || B:: value)>::type = int]' is private
> /aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/testsuite/g++.dg/diagnostic/inhibit-warn-2.C:35:7:
> error: within this context
>
> Christophe.
>
Oops. Sorry for that, it seems that I messed up with my testing box and
the backport did not actually get regtested :(.
The problem is caused by difference in wording of diagnostics. GCC 6
gives an error on line 35 and a note on line 29:
$ ./cc1plus ~/gcc/src/gcc/testsuite/g++.dg/diagnostic/inhibit-warn-2.C
void fn1()
/home/miyuki/gcc/src/gcc/testsuite/g++.dg/diagnostic/inhibit-warn-2.C:35:7:
error: 'typename A<(F<typename C< <template-parameter-1-1>
>::type>::value || B:: value)>::type D::operator=(Expr) [with Expr =
int; typename A<(F<typename C< <template-parameter-1-1> >::type>::value
|| B:: value)>::type = int]' is private within this context
opt = 0;
/home/miyuki/gcc/src/gcc/testsuite/g++.dg/diagnostic/inhibit-warn-2.C:29:3:
note: declared private here
operator=(Expr);
GCC 5 gives two errors:
/home/miyuki/gcc/src/gcc/testsuite/g++.dg/diagnostic/inhibit-warn-2.C:29:3:
error: 'typename A<(F<typename C< <template-parameter-1-1>
>::type>::value || B:: value)>::type D::operator=(Expr) [with Expr =
int; typename A<(F<typename C< <template-parameter-1-1> >::type>::value
|| B:: value)>::type = int]' is private
operator=(Expr);
/home/miyuki/gcc/src/gcc/testsuite/g++.dg/diagnostic/inhibit-warn-2.C:35:7:
error: within this context
opt = 0;
It can probably be fixed like this:
diff --git a/gcc/testsuite/g++.dg/diagnostic/inhibit-warn-2.C
b/gcc/testsuite/g++.dg/diagnostic/inhibit-warn-2.C
index cb16b4c..f658c1d 100644
--- a/gcc/testsuite/g++.dg/diagnostic/inhibit-warn-2.C
+++ b/gcc/testsuite/g++.dg/diagnostic/inhibit-warn-2.C
@@ -26,11 +26,11 @@ class D
{
template <class Expr>
typename A<F<typename C<Expr>::type>::value || B::value>::type
- operator=(Expr); // { dg-message "declared" }
+ operator=(Expr); // { dg-message "private" }
};
void fn1()
{
D opt;
- opt = 0; // { dg-error "private" }
+ opt = 0; // { dg-error "this context" }
}
But I am not sure, what should I do in this case. Maybe it is better to
remove the failing testcase from GCC 5 branch (provided that
inhibit-warn-1.C tests a fix for the same bug and does not fail)?
--
Regards,
Mikhail Maltsev
next prev parent reply other threads:[~2015-06-24 20:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-26 11:11 Mikhail Maltsev
2015-06-09 7:53 ` Marek Polacek
2015-06-19 16:43 ` Jason Merrill
2015-06-20 0:36 ` Mikhail Maltsev
2015-06-22 17:00 ` Jason Merrill
2015-06-24 16:05 ` Christophe Lyon
2015-06-24 20:39 ` Mikhail Maltsev [this message]
2015-06-26 10:02 ` James Greenhalgh
2015-06-26 21:59 ` Jason Merrill
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=558B12F2.7000602@gmail.com \
--to=maltsevm@gmail.com \
--cc=christophe.lyon@linaro.org \
--cc=gcc-patches@gnu.org \
--cc=jason@redhat.com \
--cc=polacek@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).