From patchwork Wed Feb 10 16:46:57 2016
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Marek Polacek
X-Patchwork-Id: 581489
Return-Path:
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@bilbo.ozlabs.org
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 9C8691402F0
for ;
Thu, 11 Feb 2016 03:47:12 +1100 (AEDT)
Authentication-Results: ozlabs.org; dkim=pass (1024-bit key;
unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org
header.b=mV+X55XE; dkim-atps=neutral
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id
:list-unsubscribe:list-archive:list-post:list-help:sender:date
:from:to:cc:subject:message-id:mime-version:content-type; q=dns;
s=default; b=oZp5vTiT0FNHWf34LP6EfqU9dUSV3f5miYfnHRYMVGA/NGNDeB
us7tewLfppv02BRcqo6oo8oNb8UsqwKyASN/PklmK384OVX/pdKDQksEutRrTL00
8CpY4N5MOI1fayGaeUrDUPxb5EnkolnwrmwjCHZ2yR0FDm1fIq600aQuU=
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:date
:from:to:cc:subject:message-id:mime-version:content-type; s=
default; bh=VYIFsI19b5FMFfSZMLQzIS021es=; b=mV+X55XEX/kk26ichOB+
L9gNaQbU9YIJCwAn4d99jV2+4avr8gtA5V6q/AiJDmtHJsn/yhZZ+k2ZyFHEnbLf
BmLh6EZ6yDpETZYLAVUuaYl/jNo18HY7SHupvf2Uw+wK63YRlatZaWJwZ2cd/31Y
C2UhJBVkmYditzrW5bLf084=
Received: (qmail 35222 invoked by alias); 10 Feb 2016 16:47:05 -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 35211 invoked by uid 89); 10 Feb 2016 16:47:04 -0000
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=BAYES_00,
RP_MATCHES_RCVD,
SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=unique_ptr,
Hx-languages-length:2036, Links, advise
X-HELO: mx1.redhat.com
Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by
sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with
(AES256-GCM-SHA384 encrypted) ESMTPS;
Wed, 10 Feb 2016 16:47:03 +0000
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
(int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by
mx1.redhat.com (Postfix) with ESMTPS id 3019C49DAA for
; Wed, 10 Feb 2016 16:47:02 +0000 (UTC)
Received: from redhat.com (ovpn-204-32.brq.redhat.com [10.40.204.32]) by
int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4)
with ESMTP id u1AGkwJN006352 (version=TLSv1/SSLv3
cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO);
Wed, 10 Feb 2016 11:47:00 -0500
Date: Wed, 10 Feb 2016 17:46:57 +0100
From: Marek Polacek
To: GCC Patches
Cc: Jonathan Wakely
Subject: [wwwdocs] New bits to porting_to
Message-ID: <20160210164657.GB3289@redhat.com>
MIME-Version: 1.0
Content-Disposition: inline
User-Agent: Mutt/1.5.24 (2015-08-30)
Some minor issues I noticed.
Ok?
Marek
Index: porting_to.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-6/porting_to.html,v
retrieving revision 1.7
diff -u -r1.7 porting_to.html
--- porting_to.html 9 Feb 2016 21:06:32 -0000 1.7
+++ porting_to.html 10 Feb 2016 16:45:37 -0000
@@ -220,6 +220,28 @@
the C++ standard library.
+Call of overloaded 'abs(unsigned int&)' is ambiguous
+
+
+The additional overloads can cause the compiler to reject invalid code that
+was accepted before. An example of such code is the below:
+
+
+
+#include <stdlib.h>
+
+int
+foo (unsigned x)
+{
+ abs (x);
+}
+
+
+
+Since calling abs()
on an unsigned value doesn't make sense,
+this code will become explicitly invalid as per discussion in the LWG.
+
+
Optimizations remove null pointer checks for this
@@ -239,6 +261,15 @@
pointers, not only those involving this
.
+Deprecation of std::auto_ptr
+
+
+The std::auto_ptr
template class was deprecated in C++11, so GCC
+now warns about its usage. This warning can be suppressed with the
+-Wno-deprecated-declarations command-line option, though we advise
+to port the code to use C++11's std::unique_ptr
instead.
+
+
-Wmisleading-indentation
A new warning -Wmisleading-indentation
was added
@@ -303,8 +334,24 @@
the indentation of the source was fixed instead.
-Links
+Enhanced -Wnonnull
+
+The -Wnonnull
warning has been improved so that it also warns
+about comparing parameters declared as nonnull with NULL
. For
+example, the compiler will warn about the following code:
+
+
+__attribute__((nonnull)) void
+foo (void *p)
+{
+ if (p == NULL)
+ abort ();
+ // ...
+}
+
+
+Links