public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/105221] New: gcc rejects true ? [](auto) noexcept {} : [](int) {}
@ 2022-04-11 14:25 hewillk at gmail dot com
  2022-11-08 23:23 ` [Bug c++/105221] gcc rejects true ? [](auto) noexcept {} : [](int) {} in C++17+ (works for C++14) pinskia at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: hewillk at gmail dot com @ 2022-04-11 14:25 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105221
           Summary: gcc rejects true ? [](auto) noexcept {} : [](int) {}
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hewillk at gmail dot com
  Target Milestone: ---

int main() {
  true ? [](auto) noexcept {} : [](int) {};
}

GCC-trunk only accepts the above code in C++14 but rejects it in C++17/20.
https://godbolt.org/z/7r4dKbo73

But it seems like it should be well-formed, you can see the explanation in SO:
https://stackoverflow.com/questions/71826315/ternary-operator-applied-to-different-lambdas-produces-inconsistent-results

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

end of thread, other threads:[~2023-12-20 16:53 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-11 14:25 [Bug c++/105221] New: gcc rejects true ? [](auto) noexcept {} : [](int) {} hewillk at gmail dot com
2022-11-08 23:23 ` [Bug c++/105221] gcc rejects true ? [](auto) noexcept {} : [](int) {} in C++17+ (works for C++14) pinskia at gcc dot gnu.org
2022-11-08 23:24 ` [Bug c++/105221] [10/11/12/13 Regression] " pinskia at gcc dot gnu.org
2022-11-11 18:42 ` mpolacek at gcc dot gnu.org
2022-11-29 16:49 ` pinskia at gcc dot gnu.org
2022-12-02 14:07 ` jakub at gcc dot gnu.org
2022-12-20 13:39 ` rguenth at gcc dot gnu.org
2022-12-27 14:19 ` [Bug c++/105221] [10/11/12/13 Regression] gcc rejects true ? [](auto) noexcept {} : [](int) {} in C++17+ (works for C++14) since r7-4383-g51dc660315ef83dc marxin at gcc dot gnu.org
2023-03-30 14:14 ` jason at gcc dot gnu.org
2023-03-30 14:17 ` jason at gcc dot gnu.org
2023-03-30 22:26 ` cvs-commit at gcc dot gnu.org
2023-07-07 10:43 ` [Bug c++/105221] [11/12/13/14 " rguenth at gcc dot gnu.org
2023-12-20 16:53 ` [Bug c++/105221] [11/12 " jason 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).