public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: Soul Studios <matt@soulstudios.co.nz>
Cc: "gcc@gcc.gnu.org" <gcc@gcc.gnu.org>
Subject: Re: Apparent deeply-nested missing error bug with gcc 7.3
Date: Mon, 18 Jun 2018 12:35:00 -0000	[thread overview]
Message-ID: <CAH6eHdTUoujUeqDdykLatVcbRjf_ixEoZnVs=s864+Ha9hEchQ@mail.gmail.com> (raw)
In-Reply-To: <CAH6eHdSA+hYV=9Jzpk2TF=Gj042u_t7CciC=L_sQ9ZTCH2UoOg@mail.gmail.com>

On Mon, 18 Jun 2018 at 12:09, Jonathan Wakely wrote:
>
> This is not the right place for bug reports. Please use the gcc-help
> list or Bugzilla.
>
> The most likely scenario is that GCC is performing an implicit
> conversion from pointer to some class type (like an iterator) and then
> converting that to a reference. Or the function template is not being
> called.

It's never called.

I added a call to abort() to that function, and the tests all pass. So
the function is never used, so GCC never compiles it and doesn't
notice that the return type is invalid. That's allowed by the
standard. The compiler is not required to diagnose ill-formed code in
uninstantiated templates.

  reply	other threads:[~2018-06-18 11:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-18  8:46 Soul Studios
2018-06-18 11:21 ` Jonathan Wakely
2018-06-18 12:35   ` Jonathan Wakely [this message]
2018-06-19  0:31     ` Soul Studios
2018-06-19 10:04     ` Soul Studios
2018-06-19 10:37       ` Jonathan Wakely
2018-06-19 18:30         ` Jason Merrill
2018-06-21  8:21         ` Soul Studios

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='CAH6eHdTUoujUeqDdykLatVcbRjf_ixEoZnVs=s864+Ha9hEchQ@mail.gmail.com' \
    --to=jwakely.gcc@gmail.com \
    --cc=gcc@gcc.gnu.org \
    --cc=matt@soulstudios.co.nz \
    /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).