This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: value initialization and array data member


Hi,
> On 11/05/2010 09:03 PM, Gabriel Dos Reis wrote:
>> I'm looking into std::bitset with respect to constexpr issue.
>> My understanding has always been that one can use the
>> syntax `member()' to value-initialize an array data member
>> `member'.
> I believe so.
Thanks Gaby and Jason.

I wanted to apply the below patch, which seems correct to me in the
light of your exchange and triggered ICEs, for
23_containers/bitset/cons/constexpr.cc for example I got:

In file included from
/home/paolo/Gcc/svn-dirs/trunk/libstdc++-v3/testsuite/23_containers/bitset/cons/constexpr.cc:21:0:

/home/paolo/Gcc/svn-dirs/trunk-build/x86_64-unknown-linux-gnu/libstdc++-v3/include/bitset:
In constructor 'constexpr std::_Base_bitset<_Nw>::_Base_bitset() [with
long unsigned int _Nw = 4ul]':
/home/paolo/Gcc/svn-dirs/trunk-build/x86_64-unknown-linux-gnu/libstdc++-v3/include/bitset:814:7:  
instantiated from 'constexpr std::bitset<_Nb>::bitset() [with long
unsigned int _Nb = 256ul]'
/home/paolo/Gcc/svn-dirs/trunk/libstdc++-v3/testsuite/util/testsuite_common_types.h:627:20:  
instantiated from 'void
__gnu_test::constexpr_default_constructible::operator()()::_Concept::__constraint()
[with _Tp = std::bitset<256ul>]'
/home/paolo/Gcc/svn-dirs/trunk/libstdc++-v3/testsuite/util/testsuite_common_types.h:631:17:  
instantiated from 'void
__gnu_test::constexpr_default_constructible::operator()() [with _Tp =
std::bitset<256ul>]'
/home/paolo/Gcc/svn-dirs/trunk/libstdc++-v3/testsuite/23_containers/bitset/cons/constexpr.cc:29:38:  
instantiated from here
/home/paolo/Gcc/svn-dirs/trunk-build/x86_64-unknown-linux-gnu/libstdc++-v3/include/bitset:76:18:
internal compiler error: in build_data_member_initialization, at
cp/semantics.c:5499

Can you have a look?

Thanks,
Paolo.

//////////////////////

Attachment: patchlet
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]