public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch wwwdocs] Document caveat with guard initializations for C++ on architectures without barrier instructions.
@ 2015-06-26  9:24 Ramana Radhakrishnan
  2015-06-28 15:18 ` Gerald Pfeifer
  0 siblings, 1 reply; 2+ messages in thread
From: Ramana Radhakrishnan @ 2015-06-26  9:24 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 360 bytes --]

As part of the work on PR66192 I promised a doc update at some point - 
here's that - hopefully better late than never.

I also wonder if this is worth putting into the documentation in 
addition to our release notes though I couldn't convince myself that 
standards.texi was the right place for it- any other suggestions are 
welcome.

OK ?


regards
Ramana


[-- Attachment #2: wwwdocs.txt --]
[-- Type: text/plain, Size: 1352 bytes --]

Index: htdocs/gcc-6/changes.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-6/changes.html,v
retrieving revision 1.10
diff -a -u -r1.10 changes.html
--- htdocs/gcc-6/changes.html	26 May 2015 10:12:08 -0000	1.10
+++ htdocs/gcc-6/changes.html	4 Jun 2015 09:21:21 -0000
@@ -14,6 +14,20 @@
 <!-- .................................................................. -->
 <h2>Caveats</h2>
 
+    <ul>
+        <li>On bare-metal targets for architectures like ARM
+	  that have a relaxed memory model, the compiler will generate
+	  code that calls <code>__sync_synchronize</code> for thread-safety
+	  of guard accesses for statics in C++ code. In these cases,
+	  it is expected that the user will provide either a stub function to
+	  implement <code>__sync_synchronize</code> to provide a memory
+	  barrier instruction or would compile their application with
+	  <code>-fno-threadsafe-statics</code> as may be appropriate.
+	  This can be demonstrated with the example in
+	  <a href="https://gcc.gnu.org/PR66192">PR66192</a>
+	  for the <code>arm-none-eabi</code> target, with the option
+	  <code>-mcpu=arm7tdmi</code> on the command line.  </li>
+    </ul>
 
 <!-- .................................................................. -->
 <h2 id="general">General Optimizer Improvements</h2>

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

* Re: [Patch wwwdocs] Document caveat with guard initializations for C++ on architectures without barrier instructions.
  2015-06-26  9:24 [Patch wwwdocs] Document caveat with guard initializations for C++ on architectures without barrier instructions Ramana Radhakrishnan
@ 2015-06-28 15:18 ` Gerald Pfeifer
  0 siblings, 0 replies; 2+ messages in thread
From: Gerald Pfeifer @ 2015-06-28 15:18 UTC (permalink / raw)
  To: Ramana Radhakrishnan; +Cc: gcc-patches

On Fri, 26 Jun 2015, Ramana Radhakrishnan wrote:
> OK ?

One sence has "will ... either ... or .... would" where I think 
using "will" in both cases may be better?

Apart from this it looks good to me.  Plus, as maintainer you 
don't need approval for contributions like this. :-)

Gerald

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

end of thread, other threads:[~2015-06-28 15:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-26  9:24 [Patch wwwdocs] Document caveat with guard initializations for C++ on architectures without barrier instructions Ramana Radhakrishnan
2015-06-28 15:18 ` Gerald Pfeifer

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