public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/113924] New: worse diagnostic for invalid decltype since r10-5347
@ 2024-02-14 22:28 mpolacek at gcc dot gnu.org
  2024-02-14 22:29 ` [Bug c++/113924] [11/12/13/14 Regression] " mpolacek at gcc dot gnu.org
  2024-03-07 20:40 ` law at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2024-02-14 22:28 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113924
           Summary: worse diagnostic for invalid decltype since r10-5347
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mpolacek at gcc dot gnu.org
  Target Milestone: ---

int m () = delete;

void
f (int i, int = decltype (m()){ })
{
}

void
f2 (int i, int = decltype(x){ })
{
}

used to say

/home/mpolacek/w.C:4:29: error: use of deleted function ‘int m()’
    4 | f (int i, int = decltype (m()){ })
      |                             ^
/home/mpolacek/w.C:1:5: note: declared here
    1 | int m () = delete;
      |     ^
/home/mpolacek/w.C:4:29: error: use of deleted function ‘int m()’
    4 | f (int i, int = decltype (m()){ })
      |                             ^
/home/mpolacek/w.C:1:5: note: declared here
    1 | int m () = delete;
      |     ^
/home/mpolacek/w.C:9:27: error: ‘x’ was not declared in this scope
    9 | f2 (int i, int = decltype(x){ })
      |                           ^
/home/mpolacek/w.C:9:27: error: ‘x’ was not declared in this scope

which still duplicated the errors, but now we say:

/home/mpolacek/w.C:4:29: error: use of deleted function ‘int m()’
    4 | f (int i, int = decltype (m()){ })
      |                             ^
/home/mpolacek/w.C:1:5: note: declared here
    1 | int m () = delete;
      |     ^
/home/mpolacek/w.C:4:29: error: use of deleted function ‘int m()’
    4 | f (int i, int = decltype (m()){ })
      |                             ^
/home/mpolacek/w.C:1:5: note: declared here
    1 | int m () = delete;
      |     ^
/home/mpolacek/w.C:4:17: error: expected primary-expression before ‘decltype’
    4 | f (int i, int = decltype (m()){ })
      |                 ^~~~~~~~~~~~~
/home/mpolacek/w.C:4:17: error: expected ‘,’ or ‘...’ before ‘decltype’
/home/mpolacek/w.C:4:34: error: expected unqualified-id before ‘)’ token
    4 | f (int i, int = decltype (m()){ })
      |                                  ^
/home/mpolacek/w.C:9:27: error: ‘x’ was not declared in this scope
    9 | f2 (int i, int = decltype(x){ })
      |                           ^
/home/mpolacek/w.C:9:27: error: ‘x’ was not declared in this scope
/home/mpolacek/w.C:9:18: error: expected primary-expression before ‘decltype’
    9 | f2 (int i, int = decltype(x){ })
      |                  ^~~~~~~~~~
/home/mpolacek/w.C:9:18: error: expected ‘,’ or ‘...’ before ‘decltype’
/home/mpolacek/w.C:9:32: error: expected unqualified-id before ‘)’ token
    9 | f2 (int i, int = decltype(x){ })
      |                                ^

and that's even worse.

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

* [Bug c++/113924] [11/12/13/14 Regression] worse diagnostic for invalid decltype since r10-5347
  2024-02-14 22:28 [Bug c++/113924] New: worse diagnostic for invalid decltype since r10-5347 mpolacek at gcc dot gnu.org
@ 2024-02-14 22:29 ` mpolacek at gcc dot gnu.org
  2024-03-07 20:40 ` law at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2024-02-14 22:29 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|worse diagnostic for        |[11/12/13/14 Regression]
                   |invalid decltype since      |worse diagnostic for
                   |r10-5347                    |invalid decltype since
                   |                            |r10-5347
   Target Milestone|---                         |11.5
           Keywords|                            |diagnostic

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

* [Bug c++/113924] [11/12/13/14 Regression] worse diagnostic for invalid decltype since r10-5347
  2024-02-14 22:28 [Bug c++/113924] New: worse diagnostic for invalid decltype since r10-5347 mpolacek at gcc dot gnu.org
  2024-02-14 22:29 ` [Bug c++/113924] [11/12/13/14 Regression] " mpolacek at gcc dot gnu.org
@ 2024-03-07 20:40 ` law at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: law at gcc dot gnu.org @ 2024-03-07 20:40 UTC (permalink / raw)
  To: gcc-bugs

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

Jeffrey A. Law <law at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
                 CC|                            |law at gcc dot gnu.org

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

end of thread, other threads:[~2024-03-07 20:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-14 22:28 [Bug c++/113924] New: worse diagnostic for invalid decltype since r10-5347 mpolacek at gcc dot gnu.org
2024-02-14 22:29 ` [Bug c++/113924] [11/12/13/14 Regression] " mpolacek at gcc dot gnu.org
2024-03-07 20:40 ` law 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).