---
title: -fcommon
description: "开源GCC 12.3版本将-fcommon选项默认更改为-fno-common，当存在同名全局变量时，编译时会报错：multiple definition。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengdevkithistory/hgcc/hist-hgcc/kunpenghgcc_06_0059.html
sourcePath: /source/zh/kunpengdevkithistory/hgcc/hist-hgcc/kunpenghgcc_06_0059.html
indexId: 506d9e9dfc46f280dd54e60cca89edffe3426d52956f1ea62c4cec752acf244571
---
# -fcommon

开源GCC 12.3版本将-fcommon选项默认更改为-fno-common，当存在同名全局变量时，编译时会报错：multiple definition。

解决方案：修改全局变量名字，或者添加-fcommon选项。
