From patchwork Mon Dec 2 12:41:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Polacek X-Patchwork-Id: 295909 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)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D32492C009C for ; Mon, 2 Dec 2013 23:41:29 +1100 (EST) 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:subject:message-id:mime-version:content-type; q=dns; s= default; b=ky0c0NtOd/5QidRhIwAJ73qX6gCyDekH4EtucR+zNwqhPhKZQ/Jgc 5nzTq0v1xEde/SWs3iJaWTrcwAoE/+122hvZBVrutr8iPNcAbWDoiRYzdDyeAD+I WrRpR75zJ3Cyy/+ic0UUTlnqZcvQN22kmWvfE/SgOGJdmbQd+EN93k= 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:subject:message-id:mime-version:content-type; s= default; bh=tjVU9yjLeFe/B9P/QYYATJeBq8E=; b=Uaw1nw+TE0RrD1Avlbsg s0o7Ee+kt0rcFMibe0pi5EGqgDku5A5P2HhSjAJa0WNyMiJeo9V2M3bA6XJdtQI+ Uxh7aJTmjfx+3QPDpsRwuMUJuMJ+SNRYRD5Z9jG2EYS0BZGnQP0bCLToMIkPIiQ6 ojn+6VFXISDdwiVvnha9wQk= Received: (qmail 9904 invoked by alias); 2 Dec 2013 12:41:17 -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 9892 invoked by uid 89); 2 Dec 2013 12:41:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.3 required=5.0 tests=AWL, BAYES_00, RDNS_NONE, SPAM_BODY1, SPF_HELO_PASS, SPF_PASS, URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 02 Dec 2013 12:41:14 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rB2Cf7Dr016868 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 2 Dec 2013 07:41:07 -0500 Received: from redhat.com (ovpn-116-18.ams2.redhat.com [10.36.116.18]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id rB2Cf39r011746 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Mon, 2 Dec 2013 07:41:06 -0500 Date: Mon, 2 Dec 2013 13:41:03 +0100 From: Marek Polacek To: GCC Patches Subject: [PATCH, doc] Document -fsanitize=return Message-ID: <20131202124103.GO31608@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) This patch on top of this patch by Tobias: http://gcc.gnu.org/ml/gcc-patches/2013-11/msg03082.html adds the documentation for -fsanitize=return. Ok for trunk? 2013-12-02 Marek Polacek * doc/invoke.texi: Marek --- gcc/doc/invoke.texi.mp3 2013-12-02 13:34:44.223747841 +0100 +++ gcc/doc/invoke.texi 2013-12-02 13:40:28.658028051 +0100 @@ -5352,6 +5352,14 @@ built with this option turned on will is tries to dereference a NULL pointer, or if a reference (possibly an rvalue reference) is bound to a NULL pointer. +@item -fsanitize=return +@opindex fsanitize=return + +This option enables the return statement checking. The application +built with this option turned on will issue an error message when +the end of a value-returning function without returning a value is +reached. This option works in C++ only. + @end table While @option{-ftrapv} causes traps for signed overflows to be emitted,