public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/108204] New: pr84973-2.C fails with wrong error on mingw
@ 2022-12-23 0:00 nightstrike at gmail dot com
2022-12-23 0:03 ` [Bug c++/108204] " pinskia at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: nightstrike at gmail dot com @ 2022-12-23 0:00 UTC (permalink / raw)
To: gcc-bugs
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" }
| ^
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/108204] pr84973-2.C fails with wrong error on mingw
2022-12-23 0:00 [Bug c++/108204] New: pr84973-2.C fails with wrong error on mingw nightstrike at gmail dot com
@ 2022-12-23 0:03 ` pinskia at gcc dot gnu.org
2022-12-23 0:05 ` nightstrike at gmail dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-12-23 0:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108204
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Try with -fno-ms-extensions or try -fms-extension on Linux.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/108204] pr84973-2.C fails with wrong error on mingw
2022-12-23 0:00 [Bug c++/108204] New: pr84973-2.C fails with wrong error on mingw nightstrike at gmail dot com
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
3 siblings, 0 replies; 5+ messages in thread
From: nightstrike at gmail dot com @ 2022-12-23 0:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108204
--- Comment #2 from nightstrike <nightstrike at gmail dot com> ---
(In reply to Andrew Pinski from comment #1)
> Try with -fno-ms-extensions or try -fms-extension on Linux.
Hey, we have a winner! -fms-extension on Linux results in the bad error, and
-fno-ms-extensions on mingw results in the good one!
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug testsuite/108204] pr84973-2.C fails with wrong error on mingw
2022-12-23 0:00 [Bug c++/108204] New: pr84973-2.C fails with wrong error on mingw nightstrike at gmail dot com
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 ` rguenth at gcc dot gnu.org
2023-01-09 13:26 ` nightstrike at gmail dot com
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-01-09 13:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108204
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|c++ |testsuite
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
I'd suggest to add a dg-additional-options -fno-ms-extensions to the test then.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug testsuite/108204] pr84973-2.C fails with wrong error on mingw
2022-12-23 0:00 [Bug c++/108204] New: pr84973-2.C fails with wrong error on mingw nightstrike at gmail dot com
` (2 preceding siblings ...)
2023-01-09 13:24 ` [Bug testsuite/108204] " rguenth at gcc dot gnu.org
@ 2023-01-09 13:26 ` nightstrike at gmail dot com
3 siblings, 0 replies; 5+ messages in thread
From: nightstrike at gmail dot com @ 2023-01-09 13:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108204
--- Comment #4 from nightstrike <nightstrike at gmail dot com> ---
(In reply to Richard Biener from comment #3)
> I'd suggest to add a dg-additional-options -fno-ms-extensions to the test
> then.
We certainly can (well, Jon can :P), but shouldn't the ms extensions ultimately
be fixed to work right?
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-01-09 13:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-23 0:00 [Bug c++/108204] New: pr84973-2.C fails with wrong error on mingw nightstrike at gmail dot com
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
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).