关于编译器抽风的问题
  • 板块学术版
  • 楼主Moeebius
  • 当前回复6
  • 已保存回复6
  • 发布时间2022/12/27 22:34
  • 上次更新2023/10/24 06:22:40
查看原帖
关于编译器抽风的问题
356003
Moeebius楼主2022/12/27 22:34

RT,系统 macOS 13.1,g++ 版本 g++-12 (Homebrew GCC 12.2.0) 12.2.0。

在编译这份代码的时候:

#include<bits/stdc++.h>
using namespace std;

const int MAXN=1e5+5;
vector<int> factor[MAXN];

signed main()
{

	return 0;
}

报错显示:

/var/folders/v7/yk8tz******2lhp1f80nyz700000gn/T//ccEE****.s:515:29: error: unexpected token in '.section' directive
        .section .data.rel.ro.local
                                   ^

而如果改成

#include<bits/stdc++.h>
using namespace std;

const int MAXN=1e5+5;
vector<int> factor;

signed main()
{

	return 0;
}

就能过编。

有谁知道为什么吗

2022/12/27 22:34
加载中...