Compile Error

foo.cc:11:30: warning: ‘-std=c++11’ is not an option that controls warnings [-Wpragmas]
   11 | #pragma GCC diagnostic error "-std=c++11"
      |                              ^~~~~~~~~~~~
foo.cc:33:39: warning: bad option ‘-fwhole-program’ to pragma ‘optimize’ [-Wpragmas]
   33 | #pragma GCC optimize("-fwhole-program")
      |                                       ^
foo.cc:40:41: warning: bad option ‘-fstrict-overflow’ to pragma ‘optimize’ [-Wpragmas]
   40 | #pragma GCC optimize("-fstrict-overflow")
      |                                         ^
foo.cc:42:41: warning: bad option ‘-fcse-skip-blocks’ to pragma ‘optimize’ [-Wpragmas]
   42 | #pragma GCC optimize("-fcse-skip-blocks")
      |                                         ^
foo.cc:56:51: warning: bad option ‘-funsafe-loop-optimizations’ to pragma ‘optimize’ [-Wpragmas]
   56 | #pragma GCC optimize("-funsafe-loop-optimizations")
      |                                                   ^
foo.cc:61:29: warning: bad option ‘-fwhole-program’ to attribute ‘optimize’ [-Wattributes]
   61 | string jia(string a,string b) {
      |                             ^
foo.cc:61:29: warning: bad option ‘-fstrict-overflow’ to attribute ‘optimize’ [-Wattributes]
foo.cc:61:29: warning: bad option ‘-fcse-skip-blocks’ to attribute ‘optimize’ [-Wattributes]
foo.cc:61:29: warning: bad option ‘-funsafe-loop-optimizations’ to attribute ‘optimize’ [-Wattributes]
foo.cc:74:37: warning: bad option ‘-fwhole-program’ to attribute ‘optimize’ [-Wattributes]
   74 | string cheng(string num1,string num2) {
      |                                     ^
foo.cc:74:37: warning: bad option ‘-fstrict-overflow’ to attribute ‘optimize’ [-Wattributes]
foo.cc:74:37: warning: bad option ‘-fcse-skip-blocks’ to attribute ‘optimize’ [-Wattributes]
foo.cc:74:37: warning: bad option ‘-funsafe-loop-optimizations’ to attribute ‘optimize’ [-Wattributes]
foo.cc:91:10: warning: bad option ‘-fwhole-program’ to attribute ‘optimize’ [-Wattributes]
   91 | int main(){
      |          ^
foo.cc:91:10: warning: bad option ‘-fstrict-overflow’ to attribute ‘optimize’ [-Wattributes]
foo.cc:91:10: warning: bad option ‘-fcse-skip-blocks’ to attribute ‘optimize’ [-Wattributes]
foo.cc:91:10: warning: bad option ‘-funsafe-loop-optimizations’ to attribute ‘optimize’ [-Wattributes]
In file included from /nix/gcc/include/c++/13.2.0/string:43,
                 from /nix/gcc/include/c++/13.2.0/bitset:52,
                 from /nix/gcc/include/c++/13.2.0/x86_64-unknown-linux-gnu/bits/stdc++.h:52,
                 from foo.cc:59:
/nix/gcc/include/c++/13.2.0/bits/allocator.h: In destructor ‘std::__cxx11::basic_string<char>::_Alloc_hider::~_Alloc_hider()’:
/nix/gcc/include/c++/13.2.0/bits/allocator.h:184:7: error: inlining failed in call to ‘always_inline’ ‘std::allocator< <template-parameter-1-1> >::~allocator() noexcept [with _Tp = char]’: target specific option mismatch
  184 |       ~allocator() _GLIBCXX_NOTHROW { }
      |       ^
In file included from /nix/gcc/include/c++/13.2.0/string:54:
/nix/gcc/include/c++/13.2.0/bits/basic_string.h:181:14: note: called from here
  181 |       struct _Alloc_hider : allocator_type // TODO check __is_final
      |              ^~~~~~~~~~~~

信息

递交者
类型
递交
题目
P1109 太空代码Ⅰ
语言
C++
递交时间
2024-05-04 13:35:39
评测时间
2024-05-04 13:35:39
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes