public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/43933] Suboptimal error message when supplying a bad default value in initialization
[not found] <bug-43933-4@http.gcc.gnu.org/bugzilla/>
@ 2021-06-20 9:08 ` pinskia at gcc dot gnu.org
2021-06-20 9:10 ` pinskia at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-06-20 9:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43933
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |8.3.1
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Looks like it has been fixed on the trunk:
t7.cc: In constructor ‘A::A()’:
t7.cc:13:10: error: call of overloaded ‘QString(int)’ is ambiguous
13 | A::A() : a(0), b(0) { }
| ^~~~
t7.cc:4:3: note: candidate: ‘QString::QString(char)’
4 | QString(char);
| ^~~~~~~
t7.cc:3:3: note: candidate: ‘QString::QString(const QString&)’
3 | QString(const QString&);
| ^~~~~~~
t7.cc:2:3: note: candidate: ‘QString::QString(const char*)’
2 | QString(const char*);
| ^~~~~~~
t7.cc:13:16: error: call of overloaded ‘QString(int)’ is ambiguous
13 | A::A() : a(0), b(0) { }
| ^~~~
t7.cc:4:3: note: candidate: ‘QString::QString(char)’
4 | QString(char);
| ^~~~~~~
t7.cc:3:3: note: candidate: ‘QString::QString(const QString&)’
3 | QString(const QString&);
| ^~~~~~~
t7.cc:2:3: note: candidate: ‘QString::QString(const char*)’
2 | QString(const char*);
| ^~~~~~~
It was broken in GCC 8.3 though:
t7.cc: In constructor ‘A::A()’:
t7.cc:13:19: error: call of overloaded ‘QString(int)’ is ambiguous
A::A() : a(0), b(0) { }
^
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/43933] Suboptimal error message when supplying a bad default value in initialization
[not found] <bug-43933-4@http.gcc.gnu.org/bugzilla/>
2021-06-20 9:08 ` [Bug c++/43933] Suboptimal error message when supplying a bad default value in initialization pinskia at gcc dot gnu.org
@ 2021-06-20 9:10 ` pinskia at gcc dot gnu.org
2021-06-21 12:43 ` redi at gcc dot gnu.org
2021-06-25 17:24 ` redi at gcc dot gnu.org
3 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-06-20 9:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43933
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |DUPLICATE
Status|NEW |RESOLVED
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
In the end this is a dup of bug 43064 which is fixed in GCC 9 as I shown.
*** This bug has been marked as a duplicate of bug 43064 ***
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/43933] Suboptimal error message when supplying a bad default value in initialization
[not found] <bug-43933-4@http.gcc.gnu.org/bugzilla/>
2021-06-20 9:08 ` [Bug c++/43933] Suboptimal error message when supplying a bad default value in initialization pinskia at gcc dot gnu.org
2021-06-20 9:10 ` pinskia at gcc dot gnu.org
@ 2021-06-21 12:43 ` redi at gcc dot gnu.org
2021-06-25 17:24 ` redi at gcc dot gnu.org
3 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2021-06-21 12:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43933
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
It's not fixed in GCC 9 though. I think it's probably fixed by r11-2546 for PR
94024 but I can't bisect right now.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/43933] Suboptimal error message when supplying a bad default value in initialization
[not found] <bug-43933-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2021-06-21 12:43 ` redi at gcc dot gnu.org
@ 2021-06-25 17:24 ` redi at gcc dot gnu.org
3 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2021-06-25 17:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43933
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #5)
> It's not fixed in GCC 9 though. I think it's probably fixed by r11-2546 for
> PR 94024 but I can't bisect right now.
Confirmed as that revision.
*** This bug has been marked as a duplicate of bug 94024 ***
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/43933] Suboptimal error message when supplying a bad default value in initialization
2010-04-29 11:56 [Bug c++/43933] New: " bero at arklinux dot org
2010-04-29 12:38 ` [Bug c++/43933] " redi at gcc dot gnu dot org
@ 2010-04-29 12:39 ` redi at gcc dot gnu dot org
1 sibling, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu dot org @ 2010-04-29 12:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from redi at gcc dot gnu dot org 2010-04-29 12:39 -------
self-contained testcase
struct QString {
QString(const char*);
QString(const QString&);
QString(char);
};
class A {
A();
QString a;
QString b;
};
A::A() : a(0), b(0) { }
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43933
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/43933] Suboptimal error message when supplying a bad default value in initialization
2010-04-29 11:56 [Bug c++/43933] New: " bero at arklinux dot org
@ 2010-04-29 12:38 ` redi at gcc dot gnu dot org
2010-04-29 12:39 ` redi at gcc dot gnu dot org
1 sibling, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu dot org @ 2010-04-29 12:38 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 684 bytes --]
------- Comment #1 from redi at gcc dot gnu dot org 2010-04-29 12:38 -------
test.cpp:6:12: error: call of overloaded QString(int) is ambiguous
^^^^
the column number should refer to the relevant mem-initializer
--
redi at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2010-04-29 12:38:02
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43933
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-06-25 17:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-43933-4@http.gcc.gnu.org/bugzilla/>
2021-06-20 9:08 ` [Bug c++/43933] Suboptimal error message when supplying a bad default value in initialization pinskia at gcc dot gnu.org
2021-06-20 9:10 ` pinskia at gcc dot gnu.org
2021-06-21 12:43 ` redi at gcc dot gnu.org
2021-06-25 17:24 ` redi at gcc dot gnu.org
2010-04-29 11:56 [Bug c++/43933] New: " bero at arklinux dot org
2010-04-29 12:38 ` [Bug c++/43933] " redi at gcc dot gnu dot org
2010-04-29 12:39 ` redi at gcc dot gnu dot 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).