<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.thedailywtf.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>"Side Bar" WTF</title><link>http://forums.thedailywtf.com/forums/18.aspx</link><description>Because more things make us ask WTF than just code</description><dc:language>en</dc:language><generator>CommunityServer 2007.1 (Build: 20917.1142)</generator><item><title>Re: A shortcut for resetting member variables, except not.</title><link>http://forums.thedailywtf.com/forums/thread/309593.aspx</link><pubDate>Tue, 27 Nov 2012 12:19:47 GMT</pubDate><guid isPermaLink="false">24b8a869-dfac-465a-8bea-5fc51108d524:309593</guid><dc:creator>Cassidy</dc:creator><slash:comments>0</slash:comments><comments>http://forums.thedailywtf.com/forums/thread/309593.aspx</comments><wfw:commentRss>http://forums.thedailywtf.com/forums/commentrss.aspx?SectionID=18&amp;PostID=309593</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/leanandgreen/images/icon-quote.gif"&gt; &lt;strong&gt;esoterik:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;Using dvorak with programs that don&amp;#39;t &lt;b&gt;supprot &lt;/b&gt;those commands (or don&amp;#39;t let you remap the keys) can be a pain and, but it is so much &lt;b&gt;easier and faster to type with than qwerty &lt;/b&gt;ever was.&amp;nbsp;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Oh, the riony!&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: A shortcut for resetting member variables, except not.</title><link>http://forums.thedailywtf.com/forums/thread/309303.aspx</link><pubDate>Wed, 21 Nov 2012 12:42:35 GMT</pubDate><guid isPermaLink="false">24b8a869-dfac-465a-8bea-5fc51108d524:309303</guid><dc:creator>esoterik</dc:creator><slash:comments>0</slash:comments><comments>http://forums.thedailywtf.com/forums/thread/309303.aspx</comments><wfw:commentRss>http://forums.thedailywtf.com/forums/commentrss.aspx?SectionID=18&amp;PostID=309303</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/leanandgreen/images/icon-quote.gif"&gt; &lt;strong&gt;joe.edwards:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;/p&gt;&lt;p&gt;Assuming you actually type with that layout, how do you use e.g. ctrl+z, ctrl+x, ctrl+c, ctrl+v?  They&amp;#39;re scattered all over the place!&lt;/p&gt;
&lt;p&gt;That&amp;#39;s the main reason why I ended up crawling back to QWERTY.&lt;/p&gt;&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt; I use:&lt;/p&gt;&lt;p&gt;Cut: Shift+Delete&lt;/p&gt;&lt;p&gt;Copy:&amp;nbsp; Ctrl+Insert&lt;/p&gt;&lt;p&gt;Paste: Shift+Insert&lt;/p&gt;&lt;p&gt;Using dvorak with programs that don&amp;#39;t supprot those commands (or don&amp;#39;t let you remap the keys) can be a pain and, but it is so much easier and faster to type with than qwerty ever was.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Some programs are smart enough to switch the letters automatically, however.&lt;/p&gt;&lt;p&gt;And if all else fails you can simply change back to qwerty for the shortcuts then switch back to type (alt+shift or ctrl+shift should/can swich layouts/input languages). &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: A shortcut for resetting member variables, except not.</title><link>http://forums.thedailywtf.com/forums/thread/309243.aspx</link><pubDate>Tue, 20 Nov 2012 15:19:24 GMT</pubDate><guid isPermaLink="false">24b8a869-dfac-465a-8bea-5fc51108d524:309243</guid><dc:creator>PJH</dc:creator><slash:comments>0</slash:comments><comments>http://forums.thedailywtf.com/forums/thread/309243.aspx</comments><wfw:commentRss>http://forums.thedailywtf.com/forums/commentrss.aspx?SectionID=18&amp;PostID=309243</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/leanandgreen/images/icon-quote.gif"&gt; &lt;strong&gt;joe.edwards:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;Assuming you actually type with that layout, how do you use e.g. ctrl+z, ctrl+x, ctrl+c, ctrl+v?  They&amp;#39;re scattered all over the place!&lt;/div&gt;&lt;/BLOCKQUOTE&gt; Various solutions (presuming you actually don&amp;#39;t want to use the new positions): Use an editor that doesn&amp;#39;t actually using those bindings to start with (vi), remap to what keys are present at the bottom left (;qjk), or use the alternative mappings (Ctrl/Shift+Insert/Delete).</description></item><item><title>Re: A shortcut for resetting member variables, except not.</title><link>http://forums.thedailywtf.com/forums/thread/309242.aspx</link><pubDate>Tue, 20 Nov 2012 15:13:34 GMT</pubDate><guid isPermaLink="false">24b8a869-dfac-465a-8bea-5fc51108d524:309242</guid><dc:creator>PJH</dc:creator><slash:comments>0</slash:comments><comments>http://forums.thedailywtf.com/forums/thread/309242.aspx</comments><wfw:commentRss>http://forums.thedailywtf.com/forums/commentrss.aspx?SectionID=18&amp;PostID=309242</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/leanandgreen/images/icon-quote.gif"&gt; &lt;strong&gt;Evo:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;Actually, imagine that one bit is an odd parity bit. Then the parity bit should be &amp;quot;1&amp;quot; if the integer itself is 0. If this is not the case, this quote seems to allow a trap. Note that is says &amp;quot;no arithmetic operation on &lt;b&gt;valid&lt;/b&gt; values can generate a trap representation&amp;quot;, but a representation with all 0&amp;#39;s would not be a valid value. Or am I misinterpreting the quote here?&lt;/div&gt;&lt;/BLOCKQUOTE&gt;Nope - you read it correctly. In fact that has been noted before, and a &lt;a href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_263.htm"&gt;defect report&lt;/a&gt; was raised against The Standard for exactly this situation.&lt;br /&gt;
&lt;br /&gt;
The link shows the &amp;#39;fix&amp;#39; applied to The Standard.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(I was unaware of this until just now; I&amp;#39;m clearly using a too-old version of The Standard.)</description></item><item><title>Re: A shortcut for resetting member variables, except not.</title><link>http://forums.thedailywtf.com/forums/thread/309241.aspx</link><pubDate>Tue, 20 Nov 2012 15:13:17 GMT</pubDate><guid isPermaLink="false">24b8a869-dfac-465a-8bea-5fc51108d524:309241</guid><dc:creator>joe.edwards</dc:creator><slash:comments>0</slash:comments><comments>http://forums.thedailywtf.com/forums/thread/309241.aspx</comments><wfw:commentRss>http://forums.thedailywtf.com/forums/commentrss.aspx?SectionID=18&amp;PostID=309241</wfw:commentRss><description>&lt;p&gt;Assuming you actually type with that layout, how do you use e.g. ctrl+z, ctrl+x, ctrl+c, ctrl+v?  They&amp;#39;re scattered all over the place!&lt;/p&gt;
&lt;p&gt;That&amp;#39;s the main reason why I ended up crawling back to QWERTY.&lt;/p&gt;</description></item><item><title>Re: A shortcut for resetting member variables, except not.</title><link>http://forums.thedailywtf.com/forums/thread/309240.aspx</link><pubDate>Tue, 20 Nov 2012 15:05:21 GMT</pubDate><guid isPermaLink="false">24b8a869-dfac-465a-8bea-5fc51108d524:309240</guid><dc:creator>PJH</dc:creator><slash:comments>0</slash:comments><comments>http://forums.thedailywtf.com/forums/thread/309240.aspx</comments><wfw:commentRss>http://forums.thedailywtf.com/forums/commentrss.aspx?SectionID=18&amp;PostID=309240</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/leanandgreen/images/icon-quote.gif"&gt; &lt;strong&gt;joe.edwards:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/leanandgreen/images/icon-quote.gif"&gt; &lt;strong&gt;PJH:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;No idea. However most of the stuff that &lt;i&gt;is&lt;/i&gt; &lt;b style="background:yellow;"&gt;proscribed&lt;/b&gt; by the Standard tends to be stuff that was common amongst most C compilers around the time the Standard was being written.&lt;/div&gt;&lt;/BLOCKQUOTE&gt;
&lt;p&gt;Did you mean &lt;a href="http://englishplus.com/grammar/00000294.htm" target="_blank"&gt;prescribed&lt;/a&gt;?&lt;/p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;The letters are &lt;a href="http://www.dvorak-keyboard.com/images/dvorak.gif"&gt;right next to each other&lt;/a&gt;. That&amp;#39;s my excuse, and I&amp;#39;m sticking to it.</description></item><item><title>Re: A shortcut for resetting member variables, except not.</title><link>http://forums.thedailywtf.com/forums/thread/309239.aspx</link><pubDate>Tue, 20 Nov 2012 14:54:46 GMT</pubDate><guid isPermaLink="false">24b8a869-dfac-465a-8bea-5fc51108d524:309239</guid><dc:creator>Evo</dc:creator><slash:comments>0</slash:comments><comments>http://forums.thedailywtf.com/forums/thread/309239.aspx</comments><wfw:commentRss>http://forums.thedailywtf.com/forums/commentrss.aspx?SectionID=18&amp;PostID=309239</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/leanandgreen/images/icon-quote.gif"&gt; &lt;strong&gt;PJH:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;
Probably should have quoted more. The (omitted) footnote to the bit you quote read:

&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/leanandgreen/images/icon-quote.gif"&gt; &lt;strong&gt;C99:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;  Some combinations of padding bits might generate trap representations, for example, if one padding
bit is a parity bit. Regardless, no arithmetic operation on valid values can generate a trap
representation other than as part of an exception such as an overﬂow, and this cannot occur with
unsigned types. All other combinations of padding bits are alternative object representations of the
value speciﬁed by the value bits.&lt;/div&gt;&lt;/BLOCKQUOTE&gt;
&lt;/div&gt;&lt;/BLOCKQUOTE&gt;

Actually, imagine that one bit is an odd parity bit. Then the parity bit should be &amp;quot;1&amp;quot; if the integer itself is 0. If this is not the case, this quote seems to allow a trap. Note that is says &amp;quot;no arithmetic operation on &lt;b&gt;valid&lt;/b&gt; values can generate a trap representation&amp;quot;, but a representation with all 0&amp;#39;s would not be a valid value. Or am I misinterpreting the quote here?</description></item><item><title>Re: A shortcut for resetting member variables, except not.</title><link>http://forums.thedailywtf.com/forums/thread/309238.aspx</link><pubDate>Tue, 20 Nov 2012 14:54:30 GMT</pubDate><guid isPermaLink="false">24b8a869-dfac-465a-8bea-5fc51108d524:309238</guid><dc:creator>joe.edwards</dc:creator><slash:comments>0</slash:comments><comments>http://forums.thedailywtf.com/forums/thread/309238.aspx</comments><wfw:commentRss>http://forums.thedailywtf.com/forums/commentrss.aspx?SectionID=18&amp;PostID=309238</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/leanandgreen/images/icon-quote.gif"&gt; &lt;strong&gt;PJH:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;No idea. However most of the stuff that &lt;i&gt;is&lt;/i&gt; &lt;b style="background:yellow;"&gt;proscribed&lt;/b&gt; by the Standard tends to be stuff that was common amongst most C compilers around the time the Standard was being written.&lt;/div&gt;&lt;/BLOCKQUOTE&gt;
&lt;p&gt;Did you mean &lt;a href="http://englishplus.com/grammar/00000294.htm" target="_blank"&gt;prescribed&lt;/a&gt;?&lt;/p&gt;</description></item><item><title>Re: A shortcut for resetting member variables, except not.</title><link>http://forums.thedailywtf.com/forums/thread/309236.aspx</link><pubDate>Tue, 20 Nov 2012 14:20:19 GMT</pubDate><guid isPermaLink="false">24b8a869-dfac-465a-8bea-5fc51108d524:309236</guid><dc:creator>PJH</dc:creator><slash:comments>0</slash:comments><comments>http://forums.thedailywtf.com/forums/thread/309236.aspx</comments><wfw:commentRss>http://forums.thedailywtf.com/forums/commentrss.aspx?SectionID=18&amp;PostID=309236</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/leanandgreen/images/icon-quote.gif"&gt; &lt;strong&gt;Musaran:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/leanandgreen/images/icon-quote.gif"&gt; &lt;strong&gt;PJH:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;You think wrong; it is &lt;i&gt;very well&lt;/i&gt; defined.&lt;/div&gt;&lt;/BLOCKQUOTE&gt;That leaves me wondering : Why is it &lt;i&gt;so&lt;/i&gt; precisely defined ?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;C is used at pretty low level, close to hardware that might use other implementations.&lt;/p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;No idea. However most of the stuff that &lt;i&gt;is&lt;/i&gt; proscribed by the Standard tends to be stuff that was common amongst most C compilers around the time the Standard was being written.&lt;br /&gt;
&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;p&gt;&amp;nbsp;I can think of &lt;a href="http://en.wikipedia.org/wiki/Gray_code"&gt;Gray code&lt;/a&gt; that does not use &amp;quot;increasing powers of 2 by position&amp;quot;.&lt;/p&gt;&lt;p&gt;Or &lt;a href="http://en.wikipedia.org/wiki/Binary-coded_decimal#Background"&gt;some form of BCD&lt;/a&gt; where value 0 does not use &amp;quot;all bits to 0&amp;quot;.&amp;nbsp; &lt;/p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt; Both your alternative examples of storing integers aren&amp;#39;t the easiest/&amp;#39;best&amp;#39; (for whatever definition of &amp;#39;best&amp;#39;) way of doing so; Gray typically requires lookup tables e.g., BCD wastes bits. And neither is how a typical implementation of a processor will store them.&lt;br /&gt;
&lt;br /&gt;
There is, of course, nothing stopping you implementing integers in your DS9K in such a fashion, but you will also have to implement translation functions on some boundary akin to the current &amp;#39;0 in a pointer context&amp;#39; where 0 doesn&amp;#39;t actually mean zero, and where (for example) the code snippet &lt;code&gt;var &amp;amp; 0x10&lt;/code&gt; must always return &lt;i&gt;false&lt;/i&gt; for values between 0 and 8 and &lt;i&gt;true&lt;/i&gt; for values between 8 and 15 regardless of what&amp;#39;s in bit 4 in memory.</description></item><item><title>Re: A shortcut for resetting member variables, except not.</title><link>http://forums.thedailywtf.com/forums/thread/309234.aspx</link><pubDate>Tue, 20 Nov 2012 13:44:50 GMT</pubDate><guid isPermaLink="false">24b8a869-dfac-465a-8bea-5fc51108d524:309234</guid><dc:creator>Musaran</dc:creator><slash:comments>0</slash:comments><comments>http://forums.thedailywtf.com/forums/thread/309234.aspx</comments><wfw:commentRss>http://forums.thedailywtf.com/forums/commentrss.aspx?SectionID=18&amp;PostID=309234</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/leanandgreen/images/icon-quote.gif"&gt; &lt;strong&gt;PJH:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;You think wrong; it is &lt;i&gt;very well&lt;/i&gt; defined.&lt;/div&gt;&lt;/BLOCKQUOTE&gt;That leaves me wondering : Why is it &lt;i&gt;so&lt;/i&gt; precisely defined ?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;C is used at pretty low level, close to hardware that might use other implementations.&lt;/p&gt;&lt;p&gt;&amp;nbsp;I can think of &lt;a href="http://en.wikipedia.org/wiki/Gray_code"&gt;Gray code&lt;/a&gt; that does not use &amp;quot;increasing powers of 2 by position&amp;quot;.&lt;/p&gt;&lt;p&gt;Or &lt;a href="http://en.wikipedia.org/wiki/Binary-coded_decimal#Background"&gt;some form of BCD&lt;/a&gt; where value 0 does not use &amp;quot;all bits to 0&amp;quot;.&amp;nbsp; &lt;/p&gt;</description></item><item><title>Re: A shortcut for resetting member variables, except not.</title><link>http://forums.thedailywtf.com/forums/thread/309230.aspx</link><pubDate>Tue, 20 Nov 2012 12:12:37 GMT</pubDate><guid isPermaLink="false">24b8a869-dfac-465a-8bea-5fc51108d524:309230</guid><dc:creator>PJH</dc:creator><slash:comments>0</slash:comments><comments>http://forums.thedailywtf.com/forums/thread/309230.aspx</comments><wfw:commentRss>http://forums.thedailywtf.com/forums/commentrss.aspx?SectionID=18&amp;PostID=309230</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/leanandgreen/images/icon-quote.gif"&gt; &lt;strong&gt;Evo:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&amp;quot;The values of any padding bits are unspecified.&amp;quot;

What does &amp;quot;unspecified&amp;quot; mean in this context? Does it mean that the value may not matter, or does it mean the C++ standard doesn&amp;#39;t mandate what it should be? In the latter case, any implementation may require all padding bits to be &amp;quot;1&amp;quot; for it to be a valid integer, in which case you couldn&amp;#39;t memset.&lt;/div&gt;&lt;/BLOCKQUOTE&gt;

Probably should have quoted more. The (omitted) footnote to the bit you quote read:

&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/leanandgreen/images/icon-quote.gif"&gt; &lt;strong&gt;C99:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;  Some combinations of padding bits might generate trap representations, for example, if one padding
bit is a parity bit. Regardless, no arithmetic operation on valid values can generate a trap
representation other than as part of an exception such as an overﬂow, and this cannot occur with
unsigned types. All other combinations of padding bits are alternative object representations of the
value speciﬁed by the value bits.&lt;/div&gt;&lt;/BLOCKQUOTE&gt;


&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/leanandgreen/images/icon-quote.gif"&gt; &lt;strong&gt;Evo:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;Also, he was talking about &amp;quot;int&amp;quot;, not &amp;quot;unsigned int&amp;quot;, which your quote refers to.&lt;/div&gt;&lt;/BLOCKQUOTE&gt; The only difference between the two is the presence of a sign bit, and how that bit should be interpreted:
&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/leanandgreen/images/icon-quote.gif"&gt; &lt;strong&gt;C99:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; #2&lt;br /&gt;
&lt;br /&gt;
For signed integer types, the bits of the object representation shall be divided into three groups: value bits, padding bits, and the sign bit. There need not be any padding bits; there shall be exactly one sign bit. Each bit that is a value bit shall have the same value as the same bit in the object representation of the corresponding unsigned type (if there are M value bits in the signed type and N in the unsigned type, then M&lt;br /&gt;
&lt;br /&gt;
-- the corresponding value with sign bit 0 is negated;&lt;br /&gt;
&lt;br /&gt;
-- the sign bit has the value -2&lt;sup&gt;N&lt;/sup&gt;;&lt;br /&gt;
&lt;br /&gt;
-- the sign bit has the value 1-2&lt;sup&gt;N&lt;/sup&gt;. &lt;/div&gt;&lt;/BLOCKQUOTE&gt;</description></item><item><title>Re: A shortcut for resetting member variables, except not.</title><link>http://forums.thedailywtf.com/forums/thread/309228.aspx</link><pubDate>Tue, 20 Nov 2012 11:41:57 GMT</pubDate><guid isPermaLink="false">24b8a869-dfac-465a-8bea-5fc51108d524:309228</guid><dc:creator>Evo</dc:creator><slash:comments>0</slash:comments><comments>http://forums.thedailywtf.com/forums/thread/309228.aspx</comments><wfw:commentRss>http://forums.thedailywtf.com/forums/commentrss.aspx?SectionID=18&amp;PostID=309228</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/leanandgreen/images/icon-quote.gif"&gt; &lt;strong&gt;PJH:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/leanandgreen/images/icon-quote.gif"&gt; &lt;strong&gt;Musaran:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/leanandgreen/images/icon-quote.gif"&gt; &lt;strong&gt;PJH:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;Using memset() to &amp;#39;zero&amp;#39; floats or pointers is &lt;i&gt;not&lt;/i&gt; well-defined.&lt;/div&gt;&lt;/BLOCKQUOTE&gt;Actually, I think in C/C++ it is not even defined for int.&lt;/div&gt;&lt;/BLOCKQUOTE&gt;You think wrong; it is &lt;i&gt;very well&lt;/i&gt; defined.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since you clearly can&amp;#39;t be arsed to read The Standard, and presume to know what&amp;#39;s in there without actually doing so, allow me to quote from it for you:
&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/leanandgreen/images/icon-quote.gif"&gt; &lt;strong&gt;C99 draft:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;6.2.6.2 Integer types&lt;br /&gt;
&lt;br /&gt;
#1&lt;br /&gt;
&lt;br /&gt;
For unsigned integer types other than unsigned char, the bits of the object representation shall be divided into two groups: value bits and padding bits (there need not be any of the latter). If there are N value bits, &lt;b&gt;each bit shall represent a different power of 2 between 1 and 2N-1&lt;/b&gt;, so that objects of that type shall be capable of representing values from 0 to 2N-1 using a pure binary representation; this shall be known as the value representation. The values of any padding bits are unspecified.&lt;/div&gt;&lt;/BLOCKQUOTE&gt; It then goes on to describe (in not so many words) two&amp;#39;s complement, one&amp;#39;s complement and sign-and-magnitude for signed integers.&lt;/div&gt;&lt;/BLOCKQUOTE&gt;

I&amp;#39;m not saying you&amp;#39;re not right, and I thought you were right without looking at the standard, but your quote actually makes me more hesitant:
&amp;quot;The values of any padding bits are unspecified.&amp;quot;

What does &amp;quot;unspecified&amp;quot; mean in this context? Does it mean that the value may not matter, or does it mean the C++ standard doesn&amp;#39;t mandate what it should be? In the latter case, any implementation may require all padding bits to be &amp;quot;1&amp;quot; for it to be a valid integer, in which case you couldn&amp;#39;t memset.
Also, he was talking about &amp;quot;int&amp;quot;, not &amp;quot;unsigned int&amp;quot;, which your quote refers to.</description></item><item><title>Re: A shortcut for resetting member variables, except not.</title><link>http://forums.thedailywtf.com/forums/thread/309226.aspx</link><pubDate>Tue, 20 Nov 2012 11:16:28 GMT</pubDate><guid isPermaLink="false">24b8a869-dfac-465a-8bea-5fc51108d524:309226</guid><dc:creator>PJH</dc:creator><slash:comments>0</slash:comments><comments>http://forums.thedailywtf.com/forums/thread/309226.aspx</comments><wfw:commentRss>http://forums.thedailywtf.com/forums/commentrss.aspx?SectionID=18&amp;PostID=309226</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/leanandgreen/images/icon-quote.gif"&gt; &lt;strong&gt;Musaran:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/leanandgreen/images/icon-quote.gif"&gt; &lt;strong&gt;PJH:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;Using memset() to &amp;#39;zero&amp;#39; floats or pointers is &lt;i&gt;not&lt;/i&gt; well-defined.&lt;/div&gt;&lt;/BLOCKQUOTE&gt;Actually, I think in C/C++ it is not even defined for int.&lt;/div&gt;&lt;/BLOCKQUOTE&gt;You think wrong; it is &lt;i&gt;very well&lt;/i&gt; defined.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since you clearly can&amp;#39;t be arsed to read The Standard, and presume to know what&amp;#39;s in there without actually doing so, allow me to quote from it for you:
&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/leanandgreen/images/icon-quote.gif"&gt; &lt;strong&gt;C99 draft:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;6.2.6.2 Integer types&lt;br /&gt;
&lt;br /&gt;
#1&lt;br /&gt;
&lt;br /&gt;
For unsigned integer types other than unsigned char, the bits of the object representation shall be divided into two groups: value bits and padding bits (there need not be any of the latter). If there are N value bits, &lt;b&gt;each bit shall represent a different power of 2 between 1 and 2N-1&lt;/b&gt;, so that objects of that type shall be capable of representing values from 0 to 2N-1 using a pure binary representation; this shall be known as the value representation. The values of any padding bits are unspecified.&lt;/div&gt;&lt;/BLOCKQUOTE&gt; It then goes on to describe (in not so many words) two&amp;#39;s complement, one&amp;#39;s complement and sign-and-magnitude for signed integers.</description></item><item><title>Re: A shortcut for resetting member variables, except not.</title><link>http://forums.thedailywtf.com/forums/thread/309225.aspx</link><pubDate>Tue, 20 Nov 2012 10:50:31 GMT</pubDate><guid isPermaLink="false">24b8a869-dfac-465a-8bea-5fc51108d524:309225</guid><dc:creator>Musaran</dc:creator><slash:comments>0</slash:comments><comments>http://forums.thedailywtf.com/forums/thread/309225.aspx</comments><wfw:commentRss>http://forums.thedailywtf.com/forums/commentrss.aspx?SectionID=18&amp;PostID=309225</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/leanandgreen/images/icon-quote.gif"&gt; &lt;strong&gt;PJH:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;Using memset() to &amp;#39;zero&amp;#39; floats or pointers is &lt;i&gt;not&lt;/i&gt; well-defined.&lt;/div&gt;&lt;/BLOCKQUOTE&gt;Actually, I think in C/C++ it is not even defined for int.&lt;/p&gt;&lt;p&gt;&amp;nbsp;Because C/C++ hates to define something if it does not absolutely, totally needs to be.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Of course any processor I know represents the value integer 0 with all bytes/bits set to 0.&lt;/p&gt;&lt;p&gt;But there surely is a weird beast out there that does not.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: A shortcut for resetting member variables, except not.</title><link>http://forums.thedailywtf.com/forums/thread/309222.aspx</link><pubDate>Tue, 20 Nov 2012 10:10:48 GMT</pubDate><guid isPermaLink="false">24b8a869-dfac-465a-8bea-5fc51108d524:309222</guid><dc:creator>Cbuttius</dc:creator><slash:comments>0</slash:comments><comments>http://forums.thedailywtf.com/forums/thread/309222.aspx</comments><wfw:commentRss>http://forums.thedailywtf.com/forums/commentrss.aspx?SectionID=18&amp;PostID=309222</wfw:commentRss><description>&lt;p&gt;The actual danger of memsetting a pointer to all zero bytes would be if:&lt;/p&gt;
&lt;p&gt;1. You then compare the pointer to NULL and it returns false, or you perform a boolean check on it &lt;pre&gt; if( ptr ) { ... }&lt;/pre&gt;
&lt;p&gt;2. if you called free() (or delete) on it, which is guaranteed to be no-op on a NULL pointer but that didn&amp;#39;t work on your pointer.&lt;/p&gt;
&lt;p&gt;Dereferencing it or using it for pointer arithmetic is an invalid operation regardless.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>