You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by "Martin Sebor (JIRA)" <ji...@apache.org> on 2006/06/16 00:04:30 UTC

[jira] Resolved: (STDCXX-203) errors on std::uninitialized_xxx

     [ http://issues.apache.org/jira/browse/STDCXX-203?page=all ]
     
Martin Sebor resolved STDCXX-203:
---------------------------------

    Resolution: Fixed

Fixed by the referenced change.

> errors on std::uninitialized_xxx<volatile T*>
> ---------------------------------------------
>
>          Key: STDCXX-203
>          URL: http://issues.apache.org/jira/browse/STDCXX-203
>      Project: C++ Standard Library
>         Type: Bug

>   Components: 20. General Utilities
>     Versions: 4.1.2, 4.1.3
>  Environment: all
>     Reporter: Martin Sebor
>     Assignee: Martin Sebor
>      Fix For: 4.2

>
> The following doesn't compile. It should, even if the current standard currently says it's ill-formed.
> $ cat t.cpp && gmake t
> #include <memory>
> int main ()
> {
>     volatile int i;
>     std::uninitialized_copy (&i, &i, &i);
>     std::uninitialized_fill (&i, &i, 0);
>     std::uninitialized_fill_n (&i, 0, 0);
> }
> aCC -c -I/amd/devco/sebor/dev/stdlib/include/ansi -I/usr/include     -D_RWSTD_USE_CONFIG -I/amd/devco/sebor/dev/stdlib/include -I/build/sebor/aCC-3.63-8d/include -I/amd/devco/sebor/dev/stdlib/examples/include  -Aa +nostl  +O2  +w +W392 +W655 +W684 +W818 +W819 +W849  t.cpp
> Error 226: "/amd/devco/sebor/dev/stdlib/include/rw/_specialized.h", line 124 #
>     No appropriate function found for call of '__rw_construct'. Last viable
>     candidate was "void __rw::__rw_construct<volatile int,int>(volatile int
>     *,const int &)" ["/amd/devco/sebor/dev/stdlib/include/rw/_specialized.h",
>     line 81]. Argument of type 'volatile int' could not be converted to 'const
>     int &'.
>                 _RW::__rw_construct (&*__res, *__first);
>                 ^^^^^^^^^^^^^^^^^^^                     
> Error 556: "t.cpp", line 7 # Unable to generate specialization "volatile int
>     *std::uninitialized_copy<volatile int *,volatile int *>(volatile int
>     *,volatile int *,volatile int *)" due to errors during generation.
>         std::uninitialized_copy (&i, &i, &i);
>         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
> Error 556: "t.cpp", line 7 # Unable to generate specialization "volatile int
>     *std::uninitialized_copy<volatile int *,volatile int *>(volatile int
>     *,volatile int *,volatile int *)" due to errors during generation.
>         std::uninitialized_copy (&i, &i, &i);
>         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
> Error 226: "/amd/devco/sebor/dev/stdlib/include/rw/_specialized.h", line 83 #
>     No appropriate function found for call of 'operator new'. Last viable
>     candidate was "void *operator new(unsigned long,void *)"
>     ["/amd/devco/sebor/dev/stdlib/include/rw/_new.h", line 38]. Argument of
>     type 'volatile int *' could not be converted to 'void *'.
>         ::new (__p) _TypeT (__val);
>         ^^^^^^^^^^^^^^^^^^^^^^^^^^ 
> Error 556: "t.cpp", line 8 # Unable to generate specialization "void
>     __rw::__rw_construct<volatile int,int>(volatile int *,const int &)" due to
>     errors during generation.
>         std::uninitialized_fill (&i, &i, 0);
>         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
> Error 556: "t.cpp", line 8 # Unable to generate specialization "void
>     __rw::__rw_construct<volatile int,int>(volatile int *,const int &)" due to
>     errors during generation.
>         std::uninitialized_fill (&i, &i, 0);
>         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
> Error 445: "t.cpp", line 3 # Cannot recover from earlier errors.
>     int main ()
>     ^^^^^^^^^^^
> gmake: *** [t.o] Error 2

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira