This is the mail archive of the gcc-patches@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: C++ PATCH for c++/35782, 37860


On Tue, Dec 2, 2008 at 9:04 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Tue, Dec 2, 2008 at 3:51 PM, Jason Merrill <jason@redhat.com> wrote:
>> The C++0x atomics library wants to disable copying of atomics, but still
>> support aggregate initialization.  Some folks on the committee thought that
>> the new initializer list extension would make this work; I thought that it
>> wouldn't, as
>>
>> struct A
>> {
>>  A(int);
>>  A(const A&) = delete;
>> };
>>
>> A a = { 1 };
>>
>> would involve a call to the deleted copy constructor, which is ill-formed.
>>  But when I read over the actual standardese, there's no copy constructor
>> call involved.  Which isn't what I had in mind when I wrote up the proposal,
>> but it seems to be what users want.  So I've fixed the compiler accordingly.
>>
>> Tested x86_64-pc-linux-gnu, applied to trunk.
>>
>
> It doesn't work. See:
>
> http://gcc.gnu.org/ml/gcc-testresults/2008-12/msg00207.html
>
> FAIL: g++.dg/cpp0x/initlist9.C  (test for errors, line 22)
> FAIL: g++.dg/cpp0x/initlist9.C (test for excess errors)
>

I got:

Executing on host:
/export/gnu/import/svn/gcc-test/bld/gcc/testsuite/g++/../../g++
-B/export/gnu/import/svn/gcc-test/bld/gcc/testsuite/g++/../../
/export/gnu/import/svn/gcc-test/src-trunk/gcc/testsuite/g++.dg/cpp0x/initlist9.C
 -nostdinc++ -I/export/gnu/import/svn/gcc-test/bld/x86_64-unknown-linux-gnu/32/libstdc++-v3/include/x86_64-unknown-linux-gnu
-I/export/gnu/import/svn/gcc-test/bld/x86_64-unknown-linux-gnu/32/libstdc++-v3/include
-I/export/gnu/import/svn/gcc-test/src-trunk/libstdc++-v3/libsupc++
-I/export/gnu/import/svn/gcc-test/src-trunk/libstdc++-v3/include/backward
-I/export/gnu/import/svn/gcc-test/src-trunk/libstdc++-v3/testsuite/util
-fmessage-length=0  -std=c++0x  -S  -m32 -o initlist9.s    (timeout =
300)
/export/gnu/import/svn/gcc-test/src-trunk/gcc/testsuite/g++.dg/cpp0x/initlist9.C:
In function 'int main()':^M
/export/gnu/import/svn/gcc-test/src-trunk/gcc/testsuite/g++.dg/cpp0x/initlist9.C:11:
error: deleted function 'b::b(const b&)'^M
/export/gnu/import/svn/gcc-test/src-trunk/gcc/testsuite/g++.dg/cpp0x/initlist9.C:22:
error: used here^M
compiler exited with status 1
output is:
/export/gnu/import/svn/gcc-test/src-trunk/gcc/testsuite/g++.dg/cpp0x/initlist9.C:
In function 'int main()':^M
/export/gnu/import/svn/gcc-test/src-trunk/gcc/testsuite/g++.dg/cpp0x/initlist9.C:11:
error: deleted function 'b::b(const b&)'^M
/export/gnu/import/svn/gcc-test/src-trunk/gcc/testsuite/g++.dg/cpp0x/initlist9.C:22:
error: used here^M

FAIL: g++.dg/cpp0x/initlist9.C  (test for errors, line 22)
FAIL: g++.dg/cpp0x/initlist9.C (test for excess errors)
Excess errors:
/export/gnu/import/svn/gcc-test/src-trunk/gcc/testsuite/g++.dg/cpp0x/initlist9.C:11:
error: deleted function 'b::b(const b&)'
/export/gnu/import/svn/gcc-test/src-trunk/gcc/testsuite/g++.dg/cpp0x/initlist9.C:22:
error: used here


-- 
H.J.


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