public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "nightstrike at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/108204] New: pr84973-2.C fails with wrong error on mingw
Date: Fri, 23 Dec 2022 00:00:34 +0000	[thread overview]
Message-ID: <bug-108204-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108204

            Bug ID: 108204
           Summary: pr84973-2.C fails with wrong error on mingw
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: nightstrike at gmail dot com
  Target Milestone: ---

All of the pr84973-2.C tests fail on mingw.  They give the output:

g++.dg/template/pr84973-2.C: In instantiation of 'void a()::c::b() [with int
<anonymous> = 0]':
g++.dg/template/pr84973-2.C:7:3:   required from 'void a() [with int
<anonymous> = 0]'
g++.dg/template/pr84973-2.C:12:7:   required from here
g++.dg/template/pr84973-2.C:5:20: error: statement cannot resolve address of
overloaded function

or outside the testsuite for slightly different formatting:
$ x86_64-w64-mingw32-g++ -c a.cc
a.cc: In instantiation of 'void a()::c::b() [with int <anonymous> = 0]':
a.cc:5:11:   required from 'void a() [with int <anonymous> = 0]'
a.cc:10:8:   required from here
a.cc:3:38: error: statement cannot resolve address of overloaded function
    3 |                       void b() try { b; } catch (short) { // { dg-error
"invalid use" }
      |                                      ^

On linux, however, the output is different:
a.cc: In instantiation of 'void a()::c::b() [with int <anonymous> = 0]':
a.cc:5:11:   required from 'void a() [with int <anonymous> = 0]'
a.cc:10:8:   required from here
a.cc:3:38: error: invalid use of non-static member function 'void a()::c::b()
[with int <anonymous> = 0]'
    3 |                       void b() try { b; } catch (short) { // { dg-error
"invalid use" }
      |                                      ^
a.cc:3:28: note: declared here
    3 |                       void b() try { b; } catch (short) { // { dg-error
"invalid use" }
      |                            ^

             reply	other threads:[~2022-12-23  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-23  0:00 nightstrike at gmail dot com [this message]
2022-12-23  0:03 ` [Bug c++/108204] " pinskia at gcc dot gnu.org
2022-12-23  0:05 ` nightstrike at gmail dot com
2023-01-09 13:24 ` [Bug testsuite/108204] " rguenth at gcc dot gnu.org
2023-01-09 13:26 ` nightstrike at gmail dot com

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=bug-108204-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).