c++/10529: C++ front-end troubles with uninitialized_fill_n
pcarlini@unitus.it
pcarlini@unitus.it
Mon Apr 28 22:16:00 GMT 2003
>Number: 10529
>Category: c++
>Synopsis: C++ front-end troubles with uninitialized_fill_n
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Apr 28 22:16:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Paolo Carlini
>Release: 3.2.3, 3.3 pre, 3.4 exp
>Organization:
>Environment:
i686-pc-linux-gnu
>Description:
The compiler fails to compile the attached legal code.
paolo:~> g++ ccelide.cc
ccelide.cc: In function `void std::_Construct(_T1*, const _T2&) [with _T1 =
Track, _T2 = Track]':
/usr/local/gcc-exp/include/c++/3.4/bits/stl_uninitialized.h:191: instantiated from `_ForwardIter std::__uninitialized_fill_n_aux(_ForwardIter, _Size, const _Tp&, __false_type) [with _ForwardIter = Track*, _Size = int, _Tp = Track]'
/usr/local/gcc-exp/include/c++/3.4/bits/stl_uninitialized.h:216: instantiated from `_ForwardIter std::uninitialized_fill_n(_ForwardIter, _Size, const _Tp&) [with _ForwardIter = Track*, _Size = int, _Tp = Track]'
ccelide.cc:26: instantiated from here
ccelide.cc:11: error: `Track::Track(const Track&)' is private
/usr/local/gcc-exp/include/c++/3.4/bits/stl_construct.h:78: error: within this
context
>How-To-Repeat:
Seems that the C++ frontend is involved: Comeau together
with libcomo compiles just fine the testcase and it has the
_same_ code (SGI/HP derivation) for uninitialized_fill_n of
current libstdc++-v3.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="ccelide.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="ccelide.cc"
CiNpbmNsdWRlIDxvc3RyZWFtPgojaW5jbHVkZSA8aW9zdHJlYW0+CiNpbmNsdWRlIDxtZW1vcnk+
CgpjbGFzcyBUcmFjawp7CnB1YmxpYzoKICAgIFRyYWNrKCBpbnQgaSApIDsKcHJpdmF0ZToKICAg
IFRyYWNrKCBUcmFjayBjb25zdCYgb3RoZXIgKSA7Cgpwcml2YXRlOgogICAgaW50ICAgICAgICAg
ICAgICAgICBteUkgOwp9IDsKClRyYWNrOjpUcmFjayggaW50IGkgKQogICAgOiAgIG15SSggaSAp
CnsKfQoKaW50Cm1haW4oKQp7CiAgICBUcmFjayogICAgICAgICAgICAgIG1lbSA9IChUcmFjayop
OjpvcGVyYXRvciBuZXcoIDMgKiBzaXplb2YoIFRyYWNrICkgKSA7CiAgICBzdGQ6OnVuaW5pdGlh
bGl6ZWRfZmlsbF9uKCBtZW0sIDMsIFRyYWNrKCAyICkgKSA7CiAgICBmb3IgKCBpbnQgaSA9IDAg
OyBpIDwgMyA7ICsrIGkgKSB7CiAgICAgICAgbWVtWyBpIF0uflRyYWNrKCkgOwogICAgfQogICAg
OjpvcGVyYXRvciBkZWxldGUoIG1lbSApIDsKICAgIHJldHVybiAwIDsKfQo=
More information about the Gcc-prs
mailing list