public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/113763] New: [14 Regression] build fails with clang++ host compiler because aarch64.cc uses C++14 constexpr.
@ 2024-02-05 10:13 iains at gcc dot gnu.org
  2024-02-05 11:38 ` [Bug target/113763] " iains at gcc dot gnu.org
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: iains at gcc dot gnu.org @ 2024-02-05 10:13 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113763
           Summary: [14 Regression] build fails with clang++ host compiler
                    because aarch64.cc uses C++14 constexpr.
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: build
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: iains at gcc dot gnu.org
                CC: rsandifo at gcc dot gnu.org
  Target Milestone: ---
            Target: aarch64

On aarch64, can no longer bootstrap GCC using clang because:

/src-local/gcc-master-patched/gcc/config/aarch64/aarch64.cc:13654:50: error:
constexpr variable 'tiles' must be initialized by a constant expression
  static constexpr std::pair<unsigned int, char> tiles[] = {
                                                 ^         ~
/src-local/gcc-master-patched/gcc/config/aarch64/aarch64.cc:13655:5: note:
non-constexpr constructor 'pair<int, char, nullptr>' cannot be used in a
constant expression
    { 0xff, 'b' },
    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/c++/v1/__utility/pair.h:194:5:
note: declared here
    pair(_U1&& __u1, _U2&& __u2)
    ^

It seems that GCC accepts this back to at least gcc-4.7 for std=c++11 but, at
least cppreference says that form is only constexpr from c++14 and clang++ does
not accept it.

https://en.cppreference.com/w/cpp/utility/pair/pair

trivial reproducer:

  static constexpr std::pair<unsigned int, char> tiles[] = {
    { 0xff, 'b' },
    { 0x55, 'h' },
    { 0x11, 's' },
    { 0x01, 'd' }
  };

int main(){}

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

end of thread, other threads:[~2024-02-24 20:24 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-05 10:13 [Bug target/113763] New: [14 Regression] build fails with clang++ host compiler because aarch64.cc uses C++14 constexpr iains at gcc dot gnu.org
2024-02-05 11:38 ` [Bug target/113763] " iains at gcc dot gnu.org
2024-02-05 11:54 ` jakub at gcc dot gnu.org
2024-02-05 12:21 ` redi at gcc dot gnu.org
2024-02-05 12:21 ` redi at gcc dot gnu.org
2024-02-05 14:57 ` rguenth at gcc dot gnu.org
2024-02-05 15:07 ` jakub at gcc dot gnu.org
2024-02-05 15:08 ` jakub at gcc dot gnu.org
2024-02-05 15:49 ` redi at gcc dot gnu.org
2024-02-05 15:53 ` iains at gcc dot gnu.org
2024-02-05 15:54 ` redi at gcc dot gnu.org
2024-02-05 21:35 ` jakub at gcc dot gnu.org
2024-02-06 10:03 ` rsandifo at gcc dot gnu.org
2024-02-06 10:05 ` jakub at gcc dot gnu.org
2024-02-06 10:34 ` jakub at gcc dot gnu.org
2024-02-06 10:38 ` rsandifo at gcc dot gnu.org
2024-02-06 10:42 ` redi at gcc dot gnu.org
2024-02-06 10:49 ` jakub at gcc dot gnu.org
2024-02-06 14:59 ` cvs-commit at gcc dot gnu.org
2024-02-06 15:21 ` jakub at gcc dot gnu.org
2024-02-24 20:23 ` pinskia 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).