public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/106395] New: [10/11 regression] [mingw] "redeclared without dllimport attribute: previous dllimport ignored" on C++ friend
@ 2022-07-21 21:17 thiago at kde dot org
2022-07-22 7:12 ` [Bug c++/106395] [12/13 " rguenth at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: thiago at kde dot org @ 2022-07-21 21:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106395
Bug ID: 106395
Summary: [10/11 regression] [mingw] "redeclared without
dllimport attribute: previous dllimport ignored" on
C++ friend
Product: gcc
Version: 12.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: thiago at kde dot org
Target Milestone: ---
__attribute__((dllimport)) void f();
class S
{
private:
int i;
friend __attribute__((dllimport)) void f();
};
With GCC 10.3.0 (OpenSUSE Tumbleweed):
$ x86_64-w64-mingw32-gcc -c -Werror /tmp/test.cpp
With GCC 11.2.1 (Fedora 35 & 36):
$ x86_64-w64-mingw32-gcc -Wall -Wextra -Werror -c /tmp/test.cpp
With GCC 12.1.0 (Arch Linux, self built):
$ x86_64-w64-mingw32-g++ -Werror -c /tmp/test.cpp
/tmp/test.cpp:6:44: error: ‘void f()’ redeclared without dllimport attribute:
previous dllimport ignored [-Werror=attributes]
6 | friend __attribute__((dllimport)) void f();
| ^
cc1plus: all warnings being treated as errors
GCC 12 is obviously wrong because it is complaining that the attribute is
missing and then shows that the attribute is right there.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/106395] [12/13 regression] [mingw] "redeclared without dllimport attribute: previous dllimport ignored" on C++ friend
2022-07-21 21:17 [Bug c++/106395] New: [10/11 regression] [mingw] "redeclared without dllimport attribute: previous dllimport ignored" on C++ friend thiago at kde dot org
@ 2022-07-22 7:12 ` rguenth at gcc dot gnu.org
2022-08-01 16:10 ` m101010a at gmail dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-07-22 7:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106395
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.2
Keywords| |rejects-valid
Summary|[10/11 regression] [mingw] |[12/13 regression] [mingw]
|"redeclared without |"redeclared without
|dllimport attribute: |dllimport attribute:
|previous dllimport ignored" |previous dllimport ignored"
|on C++ friend |on C++ friend
Known to fail| |12.1.0
Target| |mingw
Known to work| |10.3.0, 11.2.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/106395] [12/13 regression] [mingw] "redeclared without dllimport attribute: previous dllimport ignored" on C++ friend
2022-07-21 21:17 [Bug c++/106395] New: [10/11 regression] [mingw] "redeclared without dllimport attribute: previous dllimport ignored" on C++ friend thiago at kde dot org
2022-07-22 7:12 ` [Bug c++/106395] [12/13 " rguenth at gcc dot gnu.org
@ 2022-08-01 16:10 ` m101010a at gmail dot com
2022-08-10 13:15 ` [Bug c++/106395] [12/13 regression] [mingw] "redeclared without dllimport attribute: previous dllimport ignored" on C++ friend since r12-299-ga0fdff3cf33f72 rguenth at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: m101010a at gmail dot com @ 2022-08-01 16:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106395
m101010a at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |m101010a at gmail dot com
--- Comment #1 from m101010a at gmail dot com ---
Git bisect indicates this was caused by commit
a0fdff3cf33f72848d3f894272431a5d49fe6a16 "c++: Fix friend attributes
[PR51344]".
Also, you don't need a member variable to trigger this; I was able to reproduce
it with just
__attribute__((dllimport)) void f();
struct s
{
friend __attribute__((dllimport)) void f();
};
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/106395] [12/13 regression] [mingw] "redeclared without dllimport attribute: previous dllimport ignored" on C++ friend since r12-299-ga0fdff3cf33f72
2022-07-21 21:17 [Bug c++/106395] New: [10/11 regression] [mingw] "redeclared without dllimport attribute: previous dllimport ignored" on C++ friend thiago at kde dot org
2022-07-22 7:12 ` [Bug c++/106395] [12/13 " rguenth at gcc dot gnu.org
2022-08-01 16:10 ` m101010a at gmail dot com
@ 2022-08-10 13:15 ` rguenth at gcc dot gnu.org
2022-12-26 15:15 ` nightstrike at gmail dot com
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-08-10 13:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106395
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2022-08-10
CC| |jason at gcc dot gnu.org
Priority|P3 |P2
Summary|[12/13 regression] [mingw] |[12/13 regression] [mingw]
|"redeclared without |"redeclared without
|dllimport attribute: |dllimport attribute:
|previous dllimport ignored" |previous dllimport ignored"
|on C++ friend |on C++ friend since
| |r12-299-ga0fdff3cf33f72
Keywords|needs-bisection |
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Thanks for the bisect.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/106395] [12/13 regression] [mingw] "redeclared without dllimport attribute: previous dllimport ignored" on C++ friend since r12-299-ga0fdff3cf33f72
2022-07-21 21:17 [Bug c++/106395] New: [10/11 regression] [mingw] "redeclared without dllimport attribute: previous dllimport ignored" on C++ friend thiago at kde dot org
` (2 preceding siblings ...)
2022-08-10 13:15 ` [Bug c++/106395] [12/13 regression] [mingw] "redeclared without dllimport attribute: previous dllimport ignored" on C++ friend since r12-299-ga0fdff3cf33f72 rguenth at gcc dot gnu.org
@ 2022-12-26 15:15 ` nightstrike at gmail dot com
2023-01-17 18:51 ` i.nixman at autistici dot org
2023-05-08 12:25 ` [Bug c++/106395] [12 " rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: nightstrike at gmail dot com @ 2022-12-26 15:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106395
nightstrike <nightstrike at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nightstrike at gmail dot com
--- Comment #4 from nightstrike <nightstrike at gmail dot com> ---
This appears to be fixed in GCC 13
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/106395] [12/13 regression] [mingw] "redeclared without dllimport attribute: previous dllimport ignored" on C++ friend since r12-299-ga0fdff3cf33f72
2022-07-21 21:17 [Bug c++/106395] New: [10/11 regression] [mingw] "redeclared without dllimport attribute: previous dllimport ignored" on C++ friend thiago at kde dot org
` (3 preceding siblings ...)
2022-12-26 15:15 ` nightstrike at gmail dot com
@ 2023-01-17 18:51 ` i.nixman at autistici dot org
2023-05-08 12:25 ` [Bug c++/106395] [12 " rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: i.nixman at autistici dot org @ 2023-01-17 18:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106395
niXman <i.nixman at autistici dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |i.nixman at autistici dot org
--- Comment #5 from niXman <i.nixman at autistici dot org> ---
(In reply to nightstrike from comment #4)
> This appears to be fixed in GCC 13
yeah, looks like it got fixed for the master/main.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/106395] [12 regression] [mingw] "redeclared without dllimport attribute: previous dllimport ignored" on C++ friend since r12-299-ga0fdff3cf33f72
2022-07-21 21:17 [Bug c++/106395] New: [10/11 regression] [mingw] "redeclared without dllimport attribute: previous dllimport ignored" on C++ friend thiago at kde dot org
` (4 preceding siblings ...)
2023-01-17 18:51 ` i.nixman at autistici dot org
@ 2023-05-08 12:25 ` rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-05-08 12:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106395
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|12.3 |12.4
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 12.3 is being released, retargeting bugs to GCC 12.4.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-05-08 12:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-21 21:17 [Bug c++/106395] New: [10/11 regression] [mingw] "redeclared without dllimport attribute: previous dllimport ignored" on C++ friend thiago at kde dot org
2022-07-22 7:12 ` [Bug c++/106395] [12/13 " rguenth at gcc dot gnu.org
2022-08-01 16:10 ` m101010a at gmail dot com
2022-08-10 13:15 ` [Bug c++/106395] [12/13 regression] [mingw] "redeclared without dllimport attribute: previous dllimport ignored" on C++ friend since r12-299-ga0fdff3cf33f72 rguenth at gcc dot gnu.org
2022-12-26 15:15 ` nightstrike at gmail dot com
2023-01-17 18:51 ` i.nixman at autistici dot org
2023-05-08 12:25 ` [Bug c++/106395] [12 " rguenth at gcc dot gnu.org
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).