From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29083 invoked by alias); 13 Dec 2015 08:19:18 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 29073 invoked by uid 89); 13 Dec 2015 08:19:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.4 required=5.0 tests=AWL,BAYES_00,KAM_MXURI,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,T_FROM_12LTRDOM autolearn=no version=3.3.2 X-HELO: mail.ud10.udmedia.de Received: from ud10.udmedia.de (HELO mail.ud10.udmedia.de) (194.117.254.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sun, 13 Dec 2015 08:19:15 +0000 Received: (qmail 26268 invoked from network); 13 Dec 2015 09:19:11 +0100 Received: from ip5b41f88a.dynamic.kabel-deutschland.de (HELO x4) (ud10?360p3@91.65.248.138) by mail.ud10.udmedia.de with ESMTPSA (ECDHE-RSA-AES256-SHA encrypted, authenticated); 13 Dec 2015 09:19:11 +0100 Date: Sun, 13 Dec 2015 08:19:00 -0000 From: Markus Trippelsdorf To: Gerald Pfeifer Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] doc: discourage use of __attribute__((optimize())) in production code Message-ID: <20151213081911.GA320@x4> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-SW-Source: 2015-12/txt/msg01344.txt.bz2 Many developers are still using __attribute__((optimize())) in production code, although it quite broken. * doc/extend.texi (Common Function Attributes) [optimize]: Discourage use of the optimize attribute. diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 883d9b334ab5..a1359f5579ce 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -3021,10 +3021,8 @@ that affect more than one function. @xref{Function Specific Option Pragmas}, for details about the @samp{#pragma GCC optimize} pragma. -This can be used for instance to have frequently-executed functions -compiled with more aggressive optimization options that produce faster -and larger code, while other functions can be compiled with less -aggressive options. +This attribute should only be used for debugging purposes. It is not +suitable for production code. @item pure @cindex @code{pure} function attribute -- Markus