public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/91849] Misleading diagnostic message when binding reference to unrelated type
       [not found] <bug-91849-4@http.gcc.gnu.org/bugzilla/>
@ 2020-04-18 20:58 ` ppalka at gcc dot gnu.org
  2020-04-18 21:01 ` mpolacek at gcc dot gnu.org
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: ppalka at gcc dot gnu.org @ 2020-04-18 20:58 UTC (permalink / raw)
  To: gcc-bugs

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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ppalka at gcc dot gnu.org

--- Comment #2 from Patrick Palka <ppalka at gcc dot gnu.org> ---
g++ 4.9.4 gives a seemingly better diagnostic:


q.C: In function 'void g()':

q.C:5:12: error: invalid initialization of reference of type 'int&' from
expression of type 'float'

   int &r = f;

            ^

q.C: In function 'void g2()':

q.C:11:12: error: invalid initialization of non-const reference of type 'int&'
from an rvalue of type 'float'

   int &r = 1.f;

            ^

So should this be classified as a regression?

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/91849] Misleading diagnostic message when binding reference to unrelated type
       [not found] <bug-91849-4@http.gcc.gnu.org/bugzilla/>
  2020-04-18 20:58 ` [Bug c++/91849] Misleading diagnostic message when binding reference to unrelated type ppalka at gcc dot gnu.org
@ 2020-04-18 21:01 ` mpolacek at gcc dot gnu.org
  2020-05-07 18:07 ` [Bug c++/91849] [8/9/10/11 Regression] " ppalka at gcc dot gnu.org
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-04-18 21:01 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
I think we could, the old diagnostic at least mentioned 'float'.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/91849] [8/9/10/11 Regression] Misleading diagnostic message when binding reference to unrelated type
       [not found] <bug-91849-4@http.gcc.gnu.org/bugzilla/>
  2020-04-18 20:58 ` [Bug c++/91849] Misleading diagnostic message when binding reference to unrelated type ppalka at gcc dot gnu.org
  2020-04-18 21:01 ` mpolacek at gcc dot gnu.org
@ 2020-05-07 18:07 ` ppalka at gcc dot gnu.org
  2021-01-14  8:20 ` rguenth at gcc dot gnu.org
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: ppalka at gcc dot gnu.org @ 2020-05-07 18:07 UTC (permalink / raw)
  To: gcc-bugs

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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |10.1.0, 11.0, 8.4.0, 9.3.0
            Summary|Misleading diagnostic       |[8/9/10/11 Regression]
                   |message when binding        |Misleading diagnostic
                   |reference to unrelated type |message when binding
                   |                            |reference to unrelated type
      Known to work|                            |4.9.4
   Target Milestone|---                         |8.5
            Version|unknown                     |11.0
   Last reconfirmed|2020-01-29 00:00:00         |2020-5-7

--- Comment #4 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Marked as a regression then.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/91849] [8/9/10/11 Regression] Misleading diagnostic message when binding reference to unrelated type
       [not found] <bug-91849-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2020-05-07 18:07 ` [Bug c++/91849] [8/9/10/11 Regression] " ppalka at gcc dot gnu.org
@ 2021-01-14  8:20 ` rguenth at gcc dot gnu.org
  2021-01-28 16:18 ` jakub at gcc dot gnu.org
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-01-14  8:20 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/91849] [8/9/10/11 Regression] Misleading diagnostic message when binding reference to unrelated type
       [not found] <bug-91849-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2021-01-14  8:20 ` rguenth at gcc dot gnu.org
@ 2021-01-28 16:18 ` jakub at gcc dot gnu.org
  2021-04-08 15:54 ` jason at gcc dot gnu.org
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-01-28 16:18 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Regressed with r5-601-gd02f620dc0bb3bea393d04b8639a1f4748ad8821

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/91849] [8/9/10/11 Regression] Misleading diagnostic message when binding reference to unrelated type
       [not found] <bug-91849-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2021-01-28 16:18 ` jakub at gcc dot gnu.org
@ 2021-04-08 15:54 ` jason at gcc dot gnu.org
  2021-04-08 16:02 ` cvs-commit at gcc dot gnu.org
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: jason at gcc dot gnu.org @ 2021-04-08 15:54 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |jason at gcc dot gnu.org
                 CC|                            |jason at gcc dot gnu.org
             Status|NEW                         |ASSIGNED

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/91849] [8/9/10/11 Regression] Misleading diagnostic message when binding reference to unrelated type
       [not found] <bug-91849-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2021-04-08 15:54 ` jason at gcc dot gnu.org
@ 2021-04-08 16:02 ` cvs-commit at gcc dot gnu.org
  2021-04-08 16:05 ` [Bug c++/91849] [8/9/10 " jason at gcc dot gnu.org
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-08 16:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>:

https://gcc.gnu.org/g:9f74f9cf47ed9d65e65a06378041e9dd5698e49d

commit r11-8058-g9f74f9cf47ed9d65e65a06378041e9dd5698e49d
Author: Jason Merrill <jason@redhat.com>
Date:   Thu Apr 8 08:23:17 2021 -0400

    c++: improve reference binding diagnostic [PR91849]

    Here we were complaining about binding the lvalue reference to the rvalue
    result of converting from float to int, but didn't mention that conversion.
    Talk about the type of the initializer instead.

    gcc/cp/ChangeLog:

            PR c++/91849
            * call.c (convert_like_internal): Improve reference diagnostic.

    gcc/testsuite/ChangeLog:

            PR c++/91849
            * g++.dg/conversion/pr66211.C: Adjust diagnostic.
            * g++.dg/conversion/ref7.C: New test.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/91849] [8/9/10 Regression] Misleading diagnostic message when binding reference to unrelated type
       [not found] <bug-91849-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2021-04-08 16:02 ` cvs-commit at gcc dot gnu.org
@ 2021-04-08 16:05 ` jason at gcc dot gnu.org
  2021-05-14  9:52 ` [Bug c++/91849] [9/10 " jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: jason at gcc dot gnu.org @ 2021-04-08 16:05 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[8/9/10/11 Regression]      |[8/9/10 Regression]
                   |Misleading diagnostic       |Misleading diagnostic
                   |message when binding        |message when binding
                   |reference to unrelated type |reference to unrelated type
      Known to work|                            |11.0

--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for 11 so far.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/91849] [9/10 Regression] Misleading diagnostic message when binding reference to unrelated type
       [not found] <bug-91849-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2021-04-08 16:05 ` [Bug c++/91849] [8/9/10 " jason at gcc dot gnu.org
@ 2021-05-14  9:52 ` jakub at gcc dot gnu.org
  2021-06-01  8:15 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-05-14  9:52 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|8.5                         |9.4

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 8 branch is being closed.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/91849] [9/10 Regression] Misleading diagnostic message when binding reference to unrelated type
       [not found] <bug-91849-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2021-05-14  9:52 ` [Bug c++/91849] [9/10 " jakub at gcc dot gnu.org
@ 2021-06-01  8:15 ` rguenth at gcc dot gnu.org
  2021-08-11 22:35 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-01  8:15 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.4                         |9.5

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9.4 is being released, retargeting bugs to GCC 9.5.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/91849] [9/10 Regression] Misleading diagnostic message when binding reference to unrelated type
       [not found] <bug-91849-4@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2021-06-01  8:15 ` rguenth at gcc dot gnu.org
@ 2021-08-11 22:35 ` pinskia at gcc dot gnu.org
  2022-05-27  9:41 ` [Bug c++/91849] [10 " rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-11 22:35 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gcc at magfr dot user.lysator.liu.
                   |                            |se

--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 70384 has been marked as a duplicate of this bug. ***

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/91849] [10 Regression] Misleading diagnostic message when binding reference to unrelated type
       [not found] <bug-91849-4@http.gcc.gnu.org/bugzilla/>
                   ` (10 preceding siblings ...)
  2021-08-11 22:35 ` pinskia at gcc dot gnu.org
@ 2022-05-27  9:41 ` rguenth at gcc dot gnu.org
  2022-06-28 10:38 ` jakub at gcc dot gnu.org
  2023-07-07  8:38 ` rguenth at gcc dot gnu.org
  13 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27  9:41 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.5                         |10.4

--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9 branch is being closed

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/91849] [10 Regression] Misleading diagnostic message when binding reference to unrelated type
       [not found] <bug-91849-4@http.gcc.gnu.org/bugzilla/>
                   ` (11 preceding siblings ...)
  2022-05-27  9:41 ` [Bug c++/91849] [10 " rguenth at gcc dot gnu.org
@ 2022-06-28 10:38 ` jakub at gcc dot gnu.org
  2023-07-07  8:38 ` rguenth at gcc dot gnu.org
  13 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:38 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.4                        |10.5

--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c++/91849] [10 Regression] Misleading diagnostic message when binding reference to unrelated type
       [not found] <bug-91849-4@http.gcc.gnu.org/bugzilla/>
                   ` (12 preceding siblings ...)
  2022-06-28 10:38 ` jakub at gcc dot gnu.org
@ 2023-07-07  8:38 ` rguenth at gcc dot gnu.org
  13 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07  8:38 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
   Target Milestone|10.5                        |11.0
         Resolution|---                         |FIXED
      Known to fail|                            |10.5.0

--- Comment #13 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed in GCC 11.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-07-07  8:38 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-91849-4@http.gcc.gnu.org/bugzilla/>
2020-04-18 20:58 ` [Bug c++/91849] Misleading diagnostic message when binding reference to unrelated type ppalka at gcc dot gnu.org
2020-04-18 21:01 ` mpolacek at gcc dot gnu.org
2020-05-07 18:07 ` [Bug c++/91849] [8/9/10/11 Regression] " ppalka at gcc dot gnu.org
2021-01-14  8:20 ` rguenth at gcc dot gnu.org
2021-01-28 16:18 ` jakub at gcc dot gnu.org
2021-04-08 15:54 ` jason at gcc dot gnu.org
2021-04-08 16:02 ` cvs-commit at gcc dot gnu.org
2021-04-08 16:05 ` [Bug c++/91849] [8/9/10 " jason at gcc dot gnu.org
2021-05-14  9:52 ` [Bug c++/91849] [9/10 " jakub at gcc dot gnu.org
2021-06-01  8:15 ` rguenth at gcc dot gnu.org
2021-08-11 22:35 ` pinskia at gcc dot gnu.org
2022-05-27  9:41 ` [Bug c++/91849] [10 " rguenth at gcc dot gnu.org
2022-06-28 10:38 ` jakub at gcc dot gnu.org
2023-07-07  8:38 ` 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).