Path: csiph.com!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!border2.nntp.ams1.giganews.com!nntp.giganews.com!buffer2.nntp.ams1.giganews.com!local2.nntp.ams1.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail NNTP-Posting-Date: Mon, 31 Aug 2015 12:15:02 -0500 From: Gareth Owen Newsgroups: comp.lang.c Subject: Re: sht static guard locks References: <3c9716ac-61bd-4d69-bdcd-3635ea54bf73@googlegroups.com> Date: Mon, 31 Aug 2015 18:15:02 +0100 Message-ID: <87k2sbl6qx.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:cdNBt5NhOpq3W7+uu0HFIjvLbFQ= MIME-Version: 1.0 Content-Type: text/plain Lines: 11 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-9Gswd8c4PLypVO8a4nSVX5jle00oDyVQh4dBkWJxyKY350tby1LfWL3v/swpM7AX938fgIOOWYBc6Cj!Qzovx+PlrT9HaZsTa5ZyoQYl4Dk7lPp3MmpzSlg3Ig9iqkMJjZrdbJGWHn1fVFjrPPj7HA== X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1570 Xref: csiph.com comp.lang.c:68763 Ian Collins writes: >> If you do not care about performance (as many C++ people do) it doesn't >> matter. If you are very interested in performance this is a serious problem. > > If you take the trouble to look (but that would spoil a good rant, > wouldn't it?) you would see that static variable initialisation that > is legal in C (from a constant) is treated the same in C++ as C. The > compiler inserts guards where a race condition could occur. Tell your facts to shut up. Jacob has no interest in them.