From: Markus Trippelsdorf <markus@trippelsdorf.de>
To: Gerald Pfeifer <gerald@pfeifer.com>
Cc: gcc-patches@gcc.gnu.org
Subject: [PATCH] doc: discourage use of __attribute__((optimize())) in production code
Date: Sun, 13 Dec 2015 08:19:00 -0000 [thread overview]
Message-ID: <20151213081911.GA320@x4> (raw)
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
next reply other threads:[~2015-12-13 8:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-13 8:19 Markus Trippelsdorf [this message]
2015-12-13 20:03 ` Andi Kleen
2015-12-14 9:01 ` Richard Biener
2015-12-14 16:21 ` Trevor Saunders
2015-12-14 16:41 ` Markus Trippelsdorf
2015-12-14 17:04 ` Manuel López-Ibáñez
2015-12-14 18:57 ` Trevor Saunders
2016-04-28 15:32 ` Jeff Law
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151213081911.GA320@x4 \
--to=markus@trippelsdorf.de \
--cc=gcc-patches@gcc.gnu.org \
--cc=gerald@pfeifer.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).