Re: llvm

Kevin Zheng <[email protected]>
Newsgroups gmane.comp.gnu.gnucap.devel
Message-ID <[email protected]>
Hi Felix,

On 05/22/2014 02:51, Felix Salfelder wrote:
> compilation with llvm fails (on master).
> 
> what i did:
> $ ./configure
> $ make CCC=clang++
> [..]
> clang++ -DUNIX -O2 -DNDEBUG -I. -I../include -I../../include -W -c ../mg_main.cc
> In file included from ../mg_main.cc:24:
> In file included from ../mg_out.h:23:
> ../mg_.h:134:19: error: variable has incomplete type 'C_Comment'
>       C_Comment   c_comment;
> [..]
> 
> theres a simple fix in the "llvm" branch (attached) that reorders a few definitions.

Compilation with the Clang/LLVM toolchain still fails, but on a
different file:

/home/kevinz/workspace/gnucap/lib/c_attach.cc:111:7: error: no viable
conversion
      from '__map_iterator<__tree_iterator<struct std::__1::map<const class
      std::__1::basic_string<char>, void *, struct std::__1::less<const
class
      std::__1::basic_string<char> >, class std::__1::allocator<struct
      std::__1::pair<const class std::__1::basic_string<char>, void *> >
      >::__value_type, class std::__1::__tree_node<struct
std::__1::map<const
      class std::__1::basic_string<char>, void *, struct
std::__1::less<const
      class std::__1::basic_string<char> >, class std::__1::allocator<struct
      std::__1::pair<const class std::__1::basic_string<char>, void *> >
      >::__value_type, void *> *, [...]>>' to
      '__map_iterator<__tree_iterator<struct std::__1::map<class
      std::__1::basic_string<char>, void *, struct std::__1::less<class
      std::__1::basic_string<char> >, class std::__1::allocator<struct
      std::__1::pair<const class std::__1::basic_string<char>, void *> >
      >::__value_type, class std::__1::__tree_node<struct
std::__1::map<class
      std::__1::basic_string<char>, void *, struct std::__1::less<class
      std::__1::basic_string<char> >, class std::__1::allocator<struct
      std::__1::pair<const class std::__1::basic_string<char>, void *> >
      >::__value_type, void *> *, [...]>>'
             ii = attach_list.begin(); ii != attach_list.end(); ++ii) {
             ^    ~~~~~~~~~~~~~~~~~~~
/usr/include/c++/v1/map:499:24: note: candidate constructor (the
implicit copy
      constructor) not viable: no known conversion from 'iterator' (aka
      '__map_iterator<typename __base::iterator>') to 'const

std::__1::__map_iterator<std::__1::__tree_iterator<std::__1::map<std::__1::basic_string<char>,
      void *, std::__1::less<std::__1::basic_string<char> >,
      std::__1::allocator<std::__1::pair<const std::__1::basic_string<char>,
      void *> > >::__value_type,
      std::__1::__tree_node<std::__1::map<std::__1::basic_string<char>,
void *,
      std::__1::less<std::__1::basic_string<char> >,
      std::__1::allocator<std::__1::pair<const std::__1::basic_string<char>,
      void *> > >::__value_type, void *> *, long> > &' for 1st argument
class _LIBCPP_TYPE_VIS __map_iterator
                       ^
/usr/include/c++/v1/map:523:5: note: candidate constructor not viable:
no known
      conversion from 'iterator' (aka '__map_iterator<typename
      __base::iterator>') to
      'std::__1::__tree_iterator<std::__1::map<std::__1::basic_string<char>,
      void *, std::__1::less<std::__1::basic_string<char> >,
      std::__1::allocator<std::__1::pair<const std::__1::basic_string<char>,
      void *> > >::__value_type,
      std::__1::__tree_node<std::__1::map<std::__1::basic_string<char>,
void *,
      std::__1::less<std::__1::basic_string<char> >,
      std::__1::allocator<std::__1::pair<const std::__1::basic_string<char>,
      void *> > >::__value_type, void *> *, long>' for 1st argument
    __map_iterator(_TreeIterator __i) _NOEXCEPT : __i_(__i) {}
    ^
1 error generated.
*** Error code 1

Unfortunately I'm not certain how to fix it :p

Thanks,
Kevin Zheng
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.