This is the mail archive of the gcc-bugs@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]

[Bug libstdc++/42319] New: incomplete type char_traits if parallel mode is active


Compiling the following one-liner

    #include <bits/char_traits.h>

(one can use #include <ios> instead to avoid including from bits/)
with

    g++-trunk -std=c++0x -D_GLIBCXX_PARALLEL

produces several errors.

This was broken somewhere between
  gcc version 4.5.0 20091117 (experimental) (GCC) 
and
  gcc version 4.5.0 20091123 (experimental) (GCC)


Compile errors:

In file included from
/opt/software/x86_64/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/string:53:0,
                 from
/opt/software/x86_64/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/bits/functional_hash.h:39,
                 from
/opt/software/x86_64/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/functional:58,
                 from
/opt/software/x86_64/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/parallel/base.h:35,
                 from
/opt/software/x86_64/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/parallel/algobase.h:40,
                 from
/opt/software/x86_64/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/bits/stl_algobase.h:1152,
                 from
/opt/software/x86_64/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/bits/char_traits.h:41,
                 from char_traits-pmode-broken.cpp:2:
/opt/software/x86_64/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/bits/basic_string.h:
In instantiation of ?std::basic_string<char>?:
/opt/software/x86_64/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/bits/basic_string.h:2606:68:
  instantiated from here
/opt/software/x86_64/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/bits/basic_string.h:111:48:
error: invalid use of incomplete type ?struct std::char_traits<char>?
/opt/software/x86_64/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/bits/stl_algobase.h:404:12:
error: declaration of ?struct std::char_traits<char>?
/opt/software/x86_64/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/bits/basic_string.h:
In instantiation of ?std::basic_string<wchar_t>?:
/opt/software/x86_64/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/bits/basic_string.h:2709:68:
  instantiated from here
/opt/software/x86_64/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/bits/basic_string.h:111:48:
error: invalid use of incomplete type ?struct std::char_traits<wchar_t>?
/opt/software/x86_64/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/bits/stl_algobase.h:404:12:
error: declaration of ?struct std::char_traits<wchar_t>?
/opt/software/x86_64/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/bits/basic_string.h:
In instantiation of ?std::basic_string<char16_t>?:
/opt/software/x86_64/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/bits/functional_hash.h:236:53:
  instantiated from here
/opt/software/x86_64/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/bits/basic_string.h:111:48:
error: invalid use of incomplete type ?struct std::char_traits<char16_t>?
/opt/software/x86_64/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/bits/stl_algobase.h:404:12:
error: declaration of ?struct std::char_traits<char16_t>?
/opt/software/x86_64/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/bits/basic_string.h:
In instantiation of ?std::basic_string<char32_t>?:
/opt/software/x86_64/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/bits/functional_hash.h:248:53:
  instantiated from here
/opt/software/x86_64/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/bits/basic_string.h:111:48:
error: invalid use of incomplete type ?struct std::char_traits<char32_t>?
/opt/software/x86_64/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/bits/stl_algobase.h:404:12:
error: declaration of ?struct std::char_traits<char32_t>?


$ g++-trunk -v -std=c++0x

Using built-in specs.
COLLECT_GCC=/opt/software/x86_64/gcc-trunk/bin/g++-trunk
COLLECT_LTO_WRAPPER=/opt/software/x86_64/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/opt/software/x86_64/gcc-trunk
--program-suffix=-trunk --enable-languages=c,c++ --enable-checking
Thread model: posix
gcc version 4.5.0 20091206 (experimental) (GCC)


-- 
           Summary: incomplete type char_traits if parallel mode is active
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gcc at abeckmann dot de


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42319


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