public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "slyfox at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/114439] New: [14 Regression] icu4c-73.2 build failure: invalid initializer for array member
Date: Sat, 23 Mar 2024 09:58:20 +0000	[thread overview]
Message-ID: <bug-114439-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 114439
           Summary: [14 Regression] icu4c-73.2 build failure: invalid
                    initializer for array member
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: slyfox at gcc dot gnu.org
  Target Milestone: ---

Initially observed build failure on icu4c-73.2 using gcc
r14-9636-gc2e28df90a1640 .

The build fails there as:

regexst.cpp: In constructor
'icu_73::RegexStaticSets::RegexStaticSets(UErrorCode*)':
regexst.cpp:75:52: error: invalid initializer for array member
'icu_73::UnicodeSet icu_73::RegexStaticSets::fPropSets [13]'
   75 | RegexStaticSets::RegexStaticSets(UErrorCode *status) {
      |                                                    ^
regexst.cpp:75:52: error: invalid initializer for array member
'icu_73::Regex8BitSet icu_73::RegexStaticSets::fPropSets8 [13]'
regexst.cpp:75:52: error: invalid initializer for array member
'icu_73::UnicodeSet icu_73::RegexStaticSets::fRuleSets [3]'

Minimized example:

$ cat regexst.cpp.cpp
struct UnicodeSet {
  int *list = stackList;
  int stackList[];
};
struct RegexStaticSets {
  RegexStaticSets() {}
  UnicodeSet fPropSets[2]{};
};

$ g++-14 -std=c++11 -c regexst.cpp.cpp -o bug.o
regexst.cpp.cpp: In constructor 'RegexStaticSets::RegexStaticSets()':
regexst.cpp.cpp:6:21: error: invalid initializer for array member 'UnicodeSet
RegexStaticSets::fPropSets [2]'
    6 |   RegexStaticSets() {}
      |                     ^

For comparison gcc-13 looks fine:

$ g++-13 -std=c++11 -c regexst.cpp.cpp -o bug.o

Compiler version:

$ g++-14 -v
Using built-in specs.
COLLECT_GCC=/<<NIX>>/gcc-14.0.1/bin/g++
COLLECT_LTO_WRAPPER=/<<NIX>>/gcc-14.0.1/libexec/gcc/x86_64-unknown-linux-gnu/14.0.1/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../source/configure --prefix=/<<NIX>>/gcc-14.0.1
--with-gmp-include=/<<NIX>>/gmp-6.3.0-dev/include
--with-gmp-lib=/<<NIX>>/gmp-6.3.0/lib
--with-mpfr-include=/<<NIX>>/mpfr-4.2.1-dev/include
--with-mpfr-lib=/<<NIX>>/mpfr-4.2.1/lib --with-mpc=/<<NIX>>/libmpc-1.3.1
--with-native-system-header-dir=/<<NIX>>/glibc-2.39-dev/include
--with-build-sysroot=/
--with-gxx-include-dir=/<<NIX>>/gcc-14.0.1/include/c++/14.0.1/
--program-prefix= --enable-lto --disable-libstdcxx-pch
--without-included-gettext --with-system-zlib --enable-checking=release
--enable-static --enable-languages=c,c++ --disable-multilib --enable-plugin
--disable-libcc1 --with-isl=/<<NIX>>/isl-0.20 --disable-bootstrap
--build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu
--target=x86_64-unknown-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 14.0.1 99999999 (experimental) (GCC)

             reply	other threads:[~2024-03-23  9:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-23  9:58 slyfox at gcc dot gnu.org [this message]
2024-03-23 12:12 ` [Bug c++/114439] " slyfox at gcc dot gnu.org
2024-03-23 17:10 ` [Bug c++/114439] [14 Regression] icu4c-73.2 build failure: invalid initializer for array member with initialization of array of struct containing flexible arrays since r14-962 pinskia at gcc dot gnu.org
2024-03-23 19:15 ` [Bug c++/114439] [14 Regression] icu4c-73.2 build failure: invalid initializer for array member with initialization of array of struct containing " pinskia at gcc dot gnu.org
2024-03-24 15:01 ` [Bug c++/114439] [14 Regression] icu4c-73.2 build failure: invalid initializer for array member with initialization of array of struct containing arrays since r14-9622 xry111 at gcc dot gnu.org
2024-03-25 14:35 ` mpolacek at gcc dot gnu.org
2024-03-25 22:20 ` cvs-commit at gcc dot gnu.org
2024-03-25 22:20 ` mpolacek at gcc dot gnu.org
2024-03-26  9:08 ` slyfox at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-114439-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).