- Question on "range-for-statement" - 1 Update
- strange issue ... - 7 Updates
- On endianness, many #ifdefs, and the need thereof - 1 Update
Keith Thompson <kst-u@mib.org>: Oct 03 02:49PM -0700 >> language definition. > Why do people keep saying that? The standard library is part of the > language. The word "language" is, dare I say it, overloaded. For example, in the ISO C standard section 6 is titled "Language" and section 7 is "Library". The C++ standard doesn't have the same division (at least not as clearly), but the same logic could apply. Having said that, the "language" and the "library" are both specified by the same standard, and it's also reasonable to refer to the whole thing as the "language". (I'll also note that most of the library is optional for freestanding implementations.) -- Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst> Will write code for food. void Void(void) { Void(); } /* The recursive call of the void */ |
Bo Persson <bo@bo-persson.se>: Oct 03 10:06PM +0200 On 2019-10-03 at 22:03, Bo Persson wrote: > An old trick has been to use f(+FREE_NODE); when passing as a parameter. > That passes a reference to the temporary and not a reference to the > constant. To clarify - the temporary here is the "return value" of unary operator+. |
Bonita Montero <Bonita.Montero@gmail.com>: Oct 03 08:46PM +0200 > >... >> : f(S::x); // S::x is odr-used here: a definition is required > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Yes, because f is given a reference! |
Paavo Helde <myfirstname@osa.pri.ee>: Oct 03 11:57PM +0300 On 3.10.2019 22:38, Bonita Montero wrote: >>> ... I get the linker error because of a missing definition. >> And the type of nd->pinCounter is ...? > The same type, but that doesn't matter. That's hard to believe. Maybe you have a bug elsewhere in your code. |
Bonita Montero <Bonita.Montero@gmail.com>: Oct 03 08:49PM +0200 > If you've encountered a compiler bug, can you provide a self-contained > test case that demonstrates it? Are you saying that the code in the > first article in this thread is such an example? I don't need a test. The same const-value is taken from other methods of the class without any linker-errors when I strip the line of the constructor. I take the value from this const-"variable" in the same way in the constructor and the linker errors a missing definition.. > (I do not give permission to quote this article without a proper > attribution line.) LOL, idiot! |
Paavo Helde <myfirstname@osa.pri.ee>: Oct 03 10:28PM +0300 On 3.10.2019 22:20, Bonita Montero wrote: > I don't need a test because I have a workaround: when I cast > FREE_NODE to its own type, i.e. (uint32_t const), then I don't > get an error anymore. That's simply a bug. You are changing it from lvalue to rvalue, which can make a lot of difference, for example when binding to a reference. |
Bonita Montero <Bonita.Montero@gmail.com>: Oct 03 09:38PM +0200 >> nd->pinCounter = FREE_NODE; >> ... I get the linker error because of a missing definition. > And the type of nd->pinCounter is ...? The same type, but that doesn't matter. |
Bonita Montero <Bonita.Montero@gmail.com>: Oct 03 11:42PM +0200 >> FREE_NODE to its own type, i.e. (uint32_t const), then I don't >> get an error anymore. That's simply a bug. > No, that is because the cast creates a new temporary with the same value. LOL. |
Keith Thompson <kst-u@mib.org>: Oct 03 02:28PM -0700 David Brown <david.brown@hesbynett.no> writes: [...] > UBJSON), rather than standard text-based JSON. But is still not > necessary, and I doubt if the code's algorithm is more efficient than > the obvious endian independent method. FYI, my browser shows me a "This site may be hacked." warning for http://ubjson.org/ I haven't investigated further. -- Keith Thompson (The_Other_Keith) kst-u@mib.org <http://www.ghoti.net/~kst> Will write code for food. void Void(void) { Void(); } /* The recursive call of the void */ |
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