public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/94929] New: GCC 8 chokes on std::max in alignas
@ 2020-05-02 22:34 soap at gentoo dot org
  2020-05-03  8:44 ` [Bug c++/94929] [8 Regression] " redi at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: soap at gentoo dot org @ 2020-05-02 22:34 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94929
           Summary: GCC 8 chokes on std::max in alignas
           Product: gcc
           Version: 8.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: soap at gentoo dot org
  Target Milestone: ---

The following snippet

  #include <algorithm>

  struct One {};
  struct Two {};
  struct Foo { alignas(std::max(alignof(One), alignof(Two))) char value; };

compiles fine in GCC 9.3, but in GCC 8.4 fails with

test.cpp:5:65: error: requested alignment is not an integer constant
 struct Foo { alignas(std::max(alignof(One), alignof(Two))) char value; };
                                                                 ^~~~~

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

end of thread, other threads:[~2020-05-04 17:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-02 22:34 [Bug c++/94929] New: GCC 8 chokes on std::max in alignas soap at gentoo dot org
2020-05-03  8:44 ` [Bug c++/94929] [8 Regression] " redi at gcc dot gnu.org
2020-05-03  8:49 ` redi at gcc dot gnu.org
2020-05-04  6:43 ` rguenth at gcc dot gnu.org
2020-05-04 15:12 ` mpolacek at gcc dot gnu.org
2020-05-04 17:28 ` mpolacek at gcc dot gnu.org
2020-05-04 17:28 ` soap at gentoo dot org
2020-05-04 17:37 ` mpolacek 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).