Quantcast
Channel: Intel® Software - Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1175

Compilation fails with -fno-exceptions on icpc 19 using gcc 8.2

$
0
0

% g++-8.2 --version
g++-8.2 (GCC) 8.2.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

% icpc --version
icpc (ICC) 19.0.1.144 20181018
Copyright (C) 1985-2018 Intel Corporation.  All rights reserved.

% cat test.cpp

#include <memory>

int main(int argc, char** argv)
{
        return 0;
}

% icpc -gcc-name=gcc-8.2 -gxx-name=g++-8.2 -fno-exceptions -std=c++17 -o test test.cpp
In file included from /usr/local/gcc-8.2/include/c++/8.2.0/bits/shared_ptr_base.h(54),
                 from /usr/local/gcc-8.2/include/c++/8.2.0/bits/shared_ptr.h(52),
                 from /usr/local/gcc-8.2/include/c++/8.2.0/memory(81),
                 from test.cpp(1):
/usr/local/gcc-8.2/include/c++/8.2.0/bits/refwrap.h(102): error: class template "std::_Mem_fn_traits" has already been defined
  _GLIBCXX_MEM_FN_TRAITS(noexcept, true_type, true_type)
  ^

In file included from /usr/local/gcc-8.2/include/c++/8.2.0/bits/shared_ptr_base.h(54),
                 from /usr/local/gcc-8.2/include/c++/8.2.0/bits/shared_ptr.h(52),
                 from /usr/local/gcc-8.2/include/c++/8.2.0/memory(81),
                 from test.cpp(1):
/usr/local/gcc-8.2/include/c++/8.2.0/bits/refwrap.h(103): error: class template "std::_Mem_fn_traits" has already been defined
  _GLIBCXX_MEM_FN_TRAITS(& noexcept, true_type, false_type)
  ^

In file included from /usr/local/gcc-8.2/include/c++/8.2.0/bits/shared_ptr_base.h(54),
                 from /usr/local/gcc-8.2/include/c++/8.2.0/bits/shared_ptr.h(52),
                 from /usr/local/gcc-8.2/include/c++/8.2.0/memory(81),
                 from test.cpp(1):
/usr/local/gcc-8.2/include/c++/8.2.0/bits/refwrap.h(104): error: class template "std::_Mem_fn_traits" has already been defined
  _GLIBCXX_MEM_FN_TRAITS(&& noexcept, false_type, true_type)
  ^

compilation aborted for test.cpp (code 2)
 


Viewing all articles
Browse latest Browse all 1175

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>