public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] doc: discourage use of __attribute__((optimize())) in production code
@ 2015-12-13  8:19 Markus Trippelsdorf
  2015-12-13 20:03 ` Andi Kleen
  2016-04-28 15:32 ` Jeff Law
  0 siblings, 2 replies; 8+ messages in thread
From: Markus Trippelsdorf @ 2015-12-13  8:19 UTC (permalink / raw)
  To: Gerald Pfeifer; +Cc: gcc-patches

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-04-28 15:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-13  8:19 [PATCH] doc: discourage use of __attribute__((optimize())) in production code Markus Trippelsdorf
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

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).