From patchwork Thu Dec 5 13:14:15 2019
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Wilco Dijkstra
X-Patchwork-Id: 1204600
Return-Path:
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@bilbo.ozlabs.org
Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized)
smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131;
helo=sourceware.org;
envelope-from=gcc-patches-return-515232-incoming=patchwork.ozlabs.org@gcc.gnu.org;
receiver=)
Authentication-Results: ozlabs.org;
dmarc=none (p=none dis=none) header.from=arm.com
Authentication-Results: ozlabs.org; dkim=pass (1024-bit key;
unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org
header.b="eQEEx/MY";
dkim=fail reason="signature verification failed" (1024-bit key;
unprotected) header.d=armh.onmicrosoft.com
header.i=@armh.onmicrosoft.com header.b="v/md7a4F";
dkim=fail reason="signature verification failed" (1024-bit key)
header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com
header.b="v/md7a4F"; dkim-atps=neutral
Received: from sourceware.org (server1.sourceware.org [209.132.180.131])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256
bits)) (No client certificate requested)
by ozlabs.org (Postfix) with ESMTPS id 47TGQk1QsLz9sP3
for ;
Fri, 6 Dec 2019 00:14:36 +1100 (AEDT)
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id
:list-unsubscribe:list-archive:list-post:list-help:sender:from
:to:cc:subject:date:message-id:content-type
:content-transfer-encoding:mime-version; q=dns; s=default; b=ZRB
zRTyb6w56zJYttaOOugHgkiI1YJgRQBYj+FhLmhTDYKAwz3W17mgQtt1XONpEOJn
barODnP1oS4EceBz6AgCBiAvVlK16JKZ/JguADTtZuX5inynyReJ6Bnd5TrK76QS
l2eQLxGaRpJ7eENmA4Yx6qTPLIIlyY6taQfZGiss=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id
:list-unsubscribe:list-archive:list-post:list-help:sender:from
:to:cc:subject:date:message-id:content-type
:content-transfer-encoding:mime-version; s=default; bh=TqfMa+xj6
YH3yGKXygISMt/U/G4=; b=eQEEx/MYDfg7pSWe+dGGUiEwonAp+siZC5US4dr+3
YZ3DyFhrFr/3/j2a0b1M6byknnJedEwkBdzk1DvwTAHhdAApQ8lnUdxecVcykGne
08AZ37J0/q/MJPByCojz4BbB6pPL1CJxyvDITicxeMQz75y+smGIK9neb7jGUqLa
OU=
Received: (qmail 341 invoked by alias); 5 Dec 2019 13:14:28 -0000
Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id:
List-Unsubscribe:
List-Archive:
List-Post:
List-Help:
Sender: gcc-patches-owner@gcc.gnu.org
Delivered-To: mailing list gcc-patches@gcc.gnu.org
Received: (qmail 327 invoked by uid 89); 5 Dec 2019 13:14:28 -0000
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-20.1 required=5.0 tests=AWL, BAYES_00,
GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3,
RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS,
UNPARSEABLE_RELAY autolearn=ham version=3.3.1 spammy=
X-HELO: EUR04-DB3-obe.outbound.protection.outlook.com
Received: from mail-eopbgr60086.outbound.protection.outlook.com (HELO
EUR04-DB3-obe.outbound.protection.outlook.com) (40.107.6.86)
by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with
ESMTP; Thu, 05 Dec 2019 13:14:25 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com;
s=selector2-armh-onmicrosoft-com;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=dTfr1qDK3iSIATK8pjub/jOe5QJ4vXzJLQ0TUf4a2ls=;
b=v/md7a4FqUjRMJVg0JaHQnmw1DKXtay6oUAXhot6TzWDMgjR289n55qrx/YctN+tvyv2YWNIN4POzyNC2QaWyLD28hj2uT5j9eAW1fjliYuX4OQalrFa8gKWo665/EgLFiXf0dhw89VEuOxJ+Ly/YQF+N2l5QIGhRdh1kdNr7oM=
Received: from VI1PR0802CA0025.eurprd08.prod.outlook.com
(2603:10a6:800:a9::11) by DB6PR0802MB2536.eurprd08.prod.outlook.com
(2603:10a6:4:a2::10) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.2495.22; Thu, 5 Dec 2019 13:14:22 +0000
Received: from VE1EUR03FT033.eop-EUR03.prod.protection.outlook.com
(2a01:111:f400:7e09::206) by
VI1PR0802CA0025.outlook.office365.com (2603:10a6:800:a9::11)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.2516.13 via Frontend Transport;
Thu, 5 Dec 2019 13:14:22 +0000
Authentication-Results: spf=pass (sender IP is 63.35.35.123)
smtp.mailfrom=arm.com; gcc.gnu.org;
dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;
gcc.gnu.org;
dmarc=bestguesspass action=none header.from=arm.com;
Received-SPF: Pass (protection.outlook.com: domain of arm.com designates
63.35.35.123 as permitted sender)
receiver=protection.outlook.com; client-ip=63.35.35.123;
helo=64aa7808-outbound-1.mta.getcheckrecipient.com;
Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123)
by VE1EUR03FT033.mail.protection.outlook.com (10.152.18.147)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.2495.18 via Frontend Transport;
Thu, 5 Dec 2019 13:14:22 +0000
Received: ("Tessian outbound 45a30426f8e4:v37");
Thu, 05 Dec 2019 13:14:22 +0000
X-CheckRecipientChecked: true
X-CR-MTA-CID: fe9f50b978016b7e
X-CR-MTA-TID: 64aa7808
Received: from 9bba62a888d2.1 by
64aa7808-outbound-1.mta.getcheckrecipient.com id
D0D72C3B-AD36-4376-AA6E-46A52C408485.1;
Thu, 05 Dec 2019 13:14:16 +0000
Received: from EUR02-VE1-obe.outbound.protection.outlook.com by
64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id
9bba62a888d2.1 (version=TLSv1.2
cipher=ECDHE-RSA-AES256-GCM-SHA384);
Thu, 05 Dec 2019 13:14:16 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
b=ARm9AuoAnT1MOx4hxALjS9ZJVCS9nurdqqO8FyVSNRSzT3zuE5FAANMHhe/bRGUH195TxsBkYA0fiI3gxzxlqM6CqvsHxyVibn6pNswxiGLjmqCzSX48FEzwVY8bKtj2aq8eNE6QMGnH6WMW4WCyf6xMyPzFtaBSm+HXrlEtcFD0fB2oxxdimNQd3/mCSSncMKVjZs1etrkRumlbygrzeMZGtXqjR8+L/9UDTOqnnUx95sm+CfB7bn3XEWZnuIxn/kW1GaUeWNn8Kjt0PRhoroqupSBc3ZB/ywtCPsCsJba4gKR1L4iUi542QtbhEZiyiTFKU06TnbI8k3y2I6w2Aw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector9901;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=dTfr1qDK3iSIATK8pjub/jOe5QJ4vXzJLQ0TUf4a2ls=;
b=e+DmKibPV3uFJkJaLxwuwkLoYICXbx8QZui4xwXICId+4cgRmuaT/M/uTBRmai3NccKI5KHFUyYhwHieFi2MoYOtAkAIiWuRwEktTlsJlBDz08CtHxZwMmopTCvWw9y/cdzkKAys3MXt/HVD/GqAIMWj/saI9sYt38hCs7JBa+KHJhijlX+iXTZqCndqk/7j0N9irGUvnNXSJQPUziRSDfEdn8JOqtd6UA566RJFczDM3z6Euvn7N7gP103je0fyj4rZhPQpEsUVBIfWuPe6ybvfCvn/cBHVc8XzDRqGgS8VH1TQvBlZp7mPDUwsNcOdtDh4HnH/oDQMJ8bkf1oCDA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1;
spf=pass smtp.mailfrom=arm.com;
dmarc=pass action=none header.from=arm.com;
dkim=pass header.d=arm.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com;
s=selector2-armh-onmicrosoft-com;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=dTfr1qDK3iSIATK8pjub/jOe5QJ4vXzJLQ0TUf4a2ls=;
b=v/md7a4FqUjRMJVg0JaHQnmw1DKXtay6oUAXhot6TzWDMgjR289n55qrx/YctN+tvyv2YWNIN4POzyNC2QaWyLD28hj2uT5j9eAW1fjliYuX4OQalrFa8gKWo665/EgLFiXf0dhw89VEuOxJ+Ly/YQF+N2l5QIGhRdh1kdNr7oM=
Received: from VI1PR0801MB2127.eurprd08.prod.outlook.com (10.168.62.22) by
VI1PR0801MB2126.eurprd08.prod.outlook.com (10.168.62.145)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.2516.14; Thu, 5 Dec 2019 13:14:15 +0000
Received: from VI1PR0801MB2127.eurprd08.prod.outlook.com
([fe80::2077:6fd9:244d:8d16]) by
VI1PR0801MB2127.eurprd08.prod.outlook.com
([fe80::2077:6fd9:244d:8d16%6]) with mapi id 15.20.2516.013;
Thu, 5 Dec 2019 13:14:15 +0000
From: Wilco Dijkstra
To: GCC Patches
CC: "sandra@codesourcery.com" ,
Joseph Myers
Subject: [wwwdocs] Document -fcommon default change
Date: Thu, 5 Dec 2019 13:14:15 +0000
Message-ID:
Authentication-Results-Original: spf=none (sender IP is )
smtp.mailfrom=Wilco.Dijkstra@arm.com;
x-checkrecipientrouted: true
x-ms-oob-tlc-oobclassifiers: OLM:8273;OLM:8273;
X-Forefront-Antispam-Report-Untrusted: SFV:NSPM;
SFS:(10009020)(4636009)(396003)(136003)(346002)(39860400002)(366004)(376002)(189003)(199004)(81166006)(6916009)(81156014)(316002)(8676002)(2906002)(14454004)(86362001)(54906003)(66446008)(66556008)(71200400001)(71190400001)(8936002)(64756008)(33656002)(52536014)(76116006)(66476007)(66946007)(6506007)(26005)(4326008)(102836004)(55016002)(7696005)(5660300002)(74316002)(305945005)(9686003)(186003)(478600001)(25786009)(99286004);
DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0801MB2126;
H:VI1PR0801MB2127.eurprd08.prod.outlook.com; FPR:; SPF:None;
LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: arm.com does not designate
permitted sender hosts)
X-MS-Exchange-SenderADCheck: 1
X-Microsoft-Antispam-Untrusted: BCL:0;
X-Microsoft-Antispam-Message-Info-Original:
kNysy2xCWdjdoxbaJBEaiLic6vmglt3N+xQJRALSCaPjZA+e/YMpNQPGQQVsJO9lSGolf/lMG7bgUlx8BekCvr7aEwL0jDO9qT0z9ylf8J9ExNTPkqO0BYUE2qDCF2cKl8wVo97ZabbeROhQvtgYkJQWTX/+m30q1LUSHuRrz1enZY4PvFrYwfHKfvPfnmB1X4+bRahmf+lBZK0WBiU75OXCXdNgN9PhRBFFaebWHA3W6cRT6SPm1HZnnvC5gP4ecKt1jaQHUWAGFamyFfZ37ydCL4SlMo6o4WbmAimmROVmQ7IuX2TAezll3nD0VrNMIqZQCBc+FJKCw//7wZ9KnJh0uwy0DRZ3ONy/JPRJEp6w5HrrWctNwp4c2+OI/xYCeEdSTqO58MJb8q8cdblOGWNADWtnDI6DTIBVIpe0bwEDk3HA29f+/wKw6CDKmvt3
x-ms-exchange-transport-forked: True
MIME-Version: 1.0
Original-Authentication-Results: spf=none (sender IP is )
smtp.mailfrom=Wilco.Dijkstra@arm.com;
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
VE1EUR03FT033.eop-EUR03.prod.protection.outlook.com
X-MS-Office365-Filtering-Correlation-Id-Prvs:
f494cbb2-a7d7-4892-8ff6-08d77985071b
Hi,
Add entries for the default change in changes.html and porting_to.html.
Passes the W3 validator.
Cheers,
Wilco
diff --git a/htdocs/gcc-10/changes.html b/htdocs/gcc-10/changes.html
index e02966460450b7aad884b2d45190b9ecd8c7a5d8..304e1e8ccd38795104156e86b92062696fa5aa8b 100644
--- a/htdocs/gcc-10/changes.html
+++ b/htdocs/gcc-10/changes.html
@@ -102,6 +102,11 @@ a work-in-progress.
In C2X mode, -fno-fp-int-builtin-inexact
is
enabled by default.
+
+ GCC now defaults to -fno-common
. In C, global variables with
+ multiple tentative definitions will result in linker errors.
+ Global variable accesses are also more efficient on various targets.
+
C++
diff --git a/htdocs/gcc-10/porting_to.html b/htdocs/gcc-10/porting_to.html
index 3256e8a35d00ce1352c169a1c6df6d8f120889ee..e2c7e226a83b7720fe6ed40061cdddbc27659664 100644
--- a/htdocs/gcc-10/porting_to.html
+++ b/htdocs/gcc-10/porting_to.html
@@ -29,9 +29,25 @@ and provide solutions. Let us know if you have suggestions for improvements!
Preprocessor issues
-->
-
+
+Default to -fno-common
+
+
+ A common mistake in C is omitting extern
when declaring a global
+ variable in a header file. If the header is included by several files it
+ results in multiple definitions of the same variable. In previous GCC
+ versions this error is ignored. GCC 10 defaults to -fno-common
,
+ which means a linker error will now be reported.
+ To fix this, use extern
in header files when declaring global
+ variables, and ensure each global is defined in exactly one C file.
+ As a workaround, legacy C code can be compiled with -fcommon
.
+
+
+ int x; // tentative definition - avoid in header files
+
+ extern int y; // correct declaration in a header file
+
Fortran language issues