- Clang warning - 4 Updates
- Determining endianess at compile time - 1 Update
- nullptr vs. NULL - 1 Update
- Human Rights and Justice in Islam - 2 Updates
woodbrian77@gmail.com: May 24 08:28AM -0700 I started using a version of PC-BSD that uses clang 3.6 and am getting a warning about this code: template <unsigned long N = udp_packet_max> class SendBufferStack : public SendBuffer { ::std::array<char, N> ar; public: SendBufferStack () : SendBuffer(&ar[0], N) {} }; The warning is that field ar is uninitialized when used. I think that taking the address of the field should be OK. Gcc 4.9.2 and other compilers don't warn about the code. Is this a problem or is Clang off track? Thanks in advance. Brian Ebenezer Enterprises - "Free at last; free at last; thank G-d Almighty we are free at last." Martin Luther King Jr. http://webEbenezer.net |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: May 24 05:32PM +0100 > OK. Gcc 4.9.2 and other compilers don't warn about the > code. Is this a problem or is Clang off track? Thanks > in advance. The warning is quite valid: you are indeed using an uninitialised variable; formally it might even be undefined behaviour as you are calling a non-static member function of an object that is yet to be created. Why do you insist on writing ::std::foo Brian? The correct form is std::foo. /Flibble |
woodbrian77@gmail.com: May 24 10:36AM -0700 On Sunday, May 24, 2015 at 11:32:32 AM UTC-5, Mr Flibble wrote: > > code. Is this a problem or is Clang off track? Thanks > > in advance. > The warning is quite valid: you are indeed using an uninitialised Is taking/storing the address of an uninitialized variable wrong? > variable; formally it might even be undefined behaviour as you are > calling a non-static member function of an object that is yet to be created. > Why do you insist on writing ::std::foo Brian? The correct form is std::foo. Why do you ask? Brian Ebenezer Enterprises - Heavenly code. http://webEbenezer.net |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: May 24 08:42PM +0100 >>> in advance. >> The warning is quite valid: you are indeed using an uninitialised > Is taking/storing the address of an uninitialized variable wrong? No it isn't but calling a non-static member function, namely operator[](), on an object that doesn't yet exist is wrong. /Flibble |
woodbrian77@gmail.com: May 24 12:15PM -0700 On Tuesday, May 19, 2015 at 8:21:38 AM UTC-5, Scott Lurndal wrote: > that that choice had no impact on the development of the > architecture or the implementations, then you have no idea > of what it takes to build a processor. https://fgiesen.wordpress.com/2014/10/25/little-endian-vs-big-endian/ As far as I can tell using big-endian for network order was an arbitrary choice. Brian Ebenezer Enterprises - In G-d we trust. http://webEbenezer.net |
legalize+jeeves@mail.xmission.com (Richard): May 24 03:23AM [Please do not mail me a copy of your followup] Doug Mika <dougmmika@gmail.com> spake the secret code >When should I use NULL and when should I use nullptr? If all implementations you care about support nullptr, always use nullptr and never use NULL. You may be hampered by older implementations. -- "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline> The Computer Graphics Museum <http://computergraphicsmuseum.org> The Terminals Wiki <http://terminals.classiccmp.org> Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com> |
woodbrian77@gmail.com: May 23 05:26PM -0700 On Saturday, May 23, 2015 at 9:01:02 AM UTC-5, BV BV wrote: > Human Rights and Justice in Islam The Bible claims that G-d is the G-d of Abraham, Isaac and Israel. In other words, the G-d of faith/promises. These men put their faith in G-d and G-d used them to establish the line of David. Brian Ebenezer Enterprises |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: May 24 04:04AM +0100 > and Israel. In other words, the G-d of faith/promises. > These men put their faith in G-d and G-d used them to > establish the line of David. Don't be a fucktard Brian. Thanks to evolution we know that Abraham, Isaac, Israel, David and all other descendants of Adam never actually existed. /Flibble |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
No comments:
Post a Comment