Frederick Virchanza Gotham <cauldwell.thomas@gmail.com>: Sep 30 03:46AM -0700
Let's say you have a linker invocation as follows: g++ -o prog *.o -lmonkey -lcow -lfish -ldog I've written a program that parses your linker command and tries it without each of the libraries. If the linking succeeds, then it tells you that the library in question isn't needed. Sample invocation: ./linker_reducer "g++ -o prog *.o -pthread -lwx_gtk3u_xrc-3.1 -lwx_gtk3u_html-3.1 -lwx_gtk3u_qa-3.1 -lwx_gtk3u_core-3.1 -lwx_baseu_xml-3.1 -lwx_baseu_net-3.1 -lwx_baseu-3.1 -lpcap -lpthread -ldl" Sample output: Trying without '-lwx_gtk3u_xrc-3.1' [SUCCESS] Trying without '-lwx_gtk3u_html-3.1' [SUCCESS] Trying without '-lwx_gtk3u_qa-3.1' [SUCCESS] Trying without '-lwx_gtk3u_core-3.1' [FAILURE] Trying without '-lwx_baseu_xml-3.1' [SUCCESS] Trying without '-lwx_baseu_net-3.1' [SUCCESS] Trying without '-lwx_baseu-3.1' [FAILURE] Trying without '-lpcap' [SUCCESS] Trying without '-lpthread' [SUCCESS] Trying without '-ldl' [SUCCESS] Not needed: -lwx_gtk3u_xrc-3.1 -lwx_gtk3u_html-3.1 -lwx_gtk3u_qa-3.1 -lwx_baseu_xml-3.1 -lwx_baseu_net-3.1 -lpcap -lpthread -ldl Revised Linker invocation command: g++ -o prog *.o -pthread -lwx_gtk3u_core-3.1 -lwx_baseu-3.1 Here's the source code. Tested and working on Linux. Probably works on MS-Windows. #include <cstddef> // size_t #include <cstdlib> // system, EXIT_FAILURE #include <algorithm> // max #include <tuple> // tuple, std::get<> #include <vector> // vector #include <string> // string #include <string_view> // string_view #include <regex> // regex #include <iostream> // cout, endl using std::size_t; using std::string; using std::sregex_iterator; using std::cout; using std::endl; // The vector on the next line works as follows: // { true /* is_required */, char_index_of_library_in_string, "library_string" }; std::vector< std::tuple<bool, size_t, string> > g_libs; string Remove_Library(std::string_view const sv, size_t const index) { string s(sv); std::tuple<bool, size_t, string> const &x = g_libs.at(index); s.erase( std::get<1u>(x), std::get<2u>(x).size() ); return s; } int main(int const argc, char **const argv) { if ( argc < 2u || argc > 3u ) { cout << "This program takes two command line arguments.\n" "The first is the full linker invocation command, and\n" "the second is the regex to match a library. For example:\n\n" " " << argv[0u] << " \"g++ -o prog *.cpp -lmonkey -lcow\" -l[^\\s]+" << "\n\n"; return EXIT_FAILURE; } string linker_command{ argv[1u] }; std::regex const my_regex{ (3u == argc) ? argv[2u] : "-l[^\\s]+" }; size_t longest_library_name = 0u; for ( sregex_iterator it = sregex_iterator(linker_command.begin(), linker_command.end(), my_regex); it != sregex_iterator(); ++it ) { std::smatch const m{ *it }; //cout << m.str() << " at position " << m.position() << " with length " << m.str().size() << '\n'; g_libs.emplace_back(std::tuple<bool, size_t, string>(true, m.position(), m.str())); longest_library_name = std::max(longest_library_name, m.str().size()); } size_t i = -1; for ( auto &e : g_libs ) { ++i; string revised_linker_command( Remove_Library(linker_command,i) ); cout << "Trying without '" << std::get<2u>(e) << "' "; for ( size_t i = 0u; i < (longest_library_name - std::get<2u>(e).size()); ++i ) cout << " "; cout << std::flush; #if defined(_WIN32) || defined(_WIN64) revised_linker_command += " > NUL 2> NUL"; #else revised_linker_command += " > /dev/null 2> /dev/null";
Amine Moulay Ramdane <aminer68@gmail.com>: Sep 28 07:47AM -0700
Hello, It was my last post about my thoughts that are not about programming about threads and parallel programming, so from now on i will post only on programming about threads and parallel programming. Thank you, Amine Moulay Ramdane. |
Kaz Kylheku <864-117-4973@kylheku.com>: Sep 28 04:56PM
> were pushed in reverse order and the target architectures of the day > had limited registers, it follows that compiler writers in the day > would process arguments in reverse order when generating code. Not just limited registers; but limited analysis. Because you can reorder the evaluation to go in the stack-convenient order, in cases where you can confirm that it makes no difference. | James Kuyper <jameskuyper@alumni.caltech.edu>: Sep 28 01:15PM -0400
On 9/28/22 04:26, Kaz Kylheku wrote: >> You only do it when the order actually matters, not automatically for >> all function calls. > OK; I still need the compiler to tell me where those places are; You've got the communications direction wrong. Writing code that way is how you tell the compiler that the order matters. Writing it as a simple function call without explicit temporaries is how you tell the compiler that you think the order doesn't matter. A good compiler should inform you if realizes that the assumption is incorrect. | Bo Persson <bo@bo-persson.se>: Sep 28 08:31PM +0200
On 2022-09-28 at 18:56, Kaz Kylheku wrote: > Not just limited registers; but limited analysis. Because you can > reorder the evaluation to go in the stack-convenient order, in cases > where you can confirm that it makes no difference. The "stack convenient" order is very important for some common functions, like printf. Evaluating that function call left-to-right and push the parameters so that the format string is at the bottom of an unknown sized parameter pack is - Extremely Inconvenient(TM). So the evaluation is ordered so that the format string is pushed last and easy to find for printf. Kind of important for it to figure out the types and numbers of the other parameters. | doctor@doctor.nl2k.ab.ca (The Doctor): Sep 28 09:45PM
In article <jpji7nFi2gbU1@mid.individual.net>, >So the evaluation is ordered so that the format string is pushed last >and easy to find for printf. Kind of important for it to figure out the >types and numbers of the other parameters. C/C++ being deprecated? How would computing work? -- Member - Liberal International This is doctor@nk.ca Ici doctor@nk.ca Yahweh, King & country!Never Satan President Republic!Beware AntiChrist rising! Look at Psalms 14 and 53 on Atheism https://www.empire.kred/ROOTNK?t=94a1f39b Quebec oubliez les extremes et votez PLQ Beware https://mindspring.com | David Brown <david.brown@hesbynett.no>: Sep 28 09:32AM +0200
On 27/09/2022 21:42, Chris M. Thomasson wrote: > Yes. Using an address based hashed locking scheme works just in case the > arch does not support the direct CPU instruction(s) (think CAS vs LL/SC) > for an atomic RMW operation. LL/SC /is/ a locking scheme - using a hardware lock. And neither CAS nor LL/SC work for RMW or even plain write operations that are bigger than the processor can handle in a single write action. > However, the locking emulation is most > definitely, not ideal. Not lock-free, indeed. Processors can generally handle lock-free atomic access of a single object of limited size - usually the natural width for the processor. Some processors have instructions for double-width atomic accesses (such as a double compare-and-swap). And sometimes instruction sequences, such as LL/SC with loops, are needed - especially for RMW. Lock-free algorithms beyond that are for specific data structures. You can't make lock-free atomic access to a 32 byte object. You either have to use locks (as will be done with a std::atomic<> for the type, or using the C11 _Atomic qualifier). If you want lock-free access, you have to wrap it all up in a more advanced structure, using something like a lock-free atomic pointer to the "current" version of the data allocated on a heap. > Sorry about that non-sense David: Wrt the dangling comma. Forgot to > introduce the addend for the fetch-add RMW operation. > Shit happens. :^) That's just minor detail, so not a problem at all. | "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>: Sep 28 01:34PM -0700
On 9/28/2022 12:32 AM, David Brown wrote: > LL/SC /is/ a locking scheme - using a hardware lock. And neither CAS > nor LL/SC work for RMW or even plain write operations that are bigger > than the processor can handle in a single write action. Correct. Imvho, the hardware itself is a _lot_ more efficient at these types of things... Agreed in a sense? I actually prefer pessimistic CAS over optimistic primitives like LL/SC. Iirc, a LL/SC can fail just by reading from the reservation granule. Let alone writing to it... PPC had a special section in its docs that explain the possible issue of a live lock. Iirc, even CAS has some special logic in the processor that can actually assert a bus lock. > Some processors have instructions for double-width atomic accesses (such > as a double compare-and-swap). And sometimes instruction sequences, > such as LL/SC with loops, are needed - especially for RMW. Afaict, DWCAS is there to help get around the ABA problem ala IBM sysv appendix, oh shit, I forgot the appendix number. I used to know it, decades ago. I will try to find it. > have to wrap it all up in a more advanced structure, using something > like a lock-free atomic pointer to the "current" version of the data > allocated on a heap. Agreed. Although, I have created lock-free allocators that never used dynamic memory, believe it or not. Everything exists on threads stacks. And memory from thread A could be "freed" by another thread. I remember a project I had to do for a Quadros based system. Completely based on stacks. Wow, what a time. >> introduce the addend for the fetch-add RMW operation. >> Shit happens. :^) > That's just minor detail, so not a problem at all. Thanks. :^) | scott@slp53.sl.home (Scott Lurndal): Sep 28 09:11PM
>a special section in its docs that explain the possible issue of a live >lock. Iirc, even CAS has some special logic in the processor that can >actually assert a bus lock. When ARM was designing their 64-bit architecture (ARMv8) circa 2011/2, they only provided a LL/SC equivalent (load-exclusive/store-exclusive). Their architecture partners at the time quickly requested support for real RMW atomics, which were added as part of the LSE (Large System ISA Extensions). LDADD, LDCLR (and with complement), LDSET (or), LDEOR (xor), LDSMAX (signed maximum), LDUMAX (unsigned maximum), LDSMIN, LDUMIN. The processor fabric forwards the operation to the point of coherency (e.g. the L2/LLC) for cachable memory locations and to the endpoint for uncachable memory locations (e.g. a PCIexpress or CXL endpoint). |
Manfred <noname@add.invalid>: Sep 28 05:40AM +0200
On 9/28/2022 12:12 AM, Lynn McGuire wrote: > "I used to be one of them." > He is not wrong. > Lynn The point still stands. The author's assumption is that debug mode == no optimizations. That's not the case. | Juha Nieminen <nospam@thanks.invalid>: Sep 28 05:44AM
> are so valuable that having your program perform poorly in debug mode > (i.e. without optimizations enabled) and compile more slowly is worth it." > "I used to be one of them." "When I don't use compiler optimizations the program is slower." Well, duh. What exactly is he expecting? (And as has been pointed out, debugging and optimizations are not a mutually exclusive thing. Nothing stops you from specifying optimization flags *and* debugging flags at the same time.) | Mr Flibble <flibble@reddwarf.jmc.corp>: Sep 28 05:22PM +0100
On Tue, 27 Sep 2022 17:12:10 -0500 > slowly is worth it." > "I used to be one of them." > He is not wrong. He is wrong, and so are you. /Flibble | Jivanmukta <jivanmukta@poczta.onet.pl>: Sep 28 01:53PM +0200
I don't understand what's wrong in my code: std::vector<std::wstring> vendor_frameworks_dirs; ... for (auto dir = vendor_frameworks_dirs.begin(); dir != vendor_frameworks_dirs.end(); ++dir) Error: /usr/include/c++/9/debug/safe_iterator.h:294: In function: __gnu_debug::_Safe_iterator<_Iterator, _Sequence, _Category>::reference __gnu_debug::_Safe_iterator<_Iterator, _Sequence, _Category>::operator*() const [with _Iterator = __gnu_cxx::__normal_iterator<std::__cxx11::basic_string<wchar_t>*, std::__cxx1998::vector<std::__cxx11::basic_string<wchar_t>, std::allocator<std::__cxx11::basic_string<wchar_t> > > >; _Sequence = std::__debug::vector<std::__cxx11::basic_string<wchar_t> >; _Category = std::forward_iterator_tag; __gnu_debug::_Safe_iterator<_Iterator, _Sequence, _Category>::reference = std::__cxx11::basic_string<wchar_t>&] Error: attempt to dereference a singular iterator. Objects involved in the operation: iterator "this" @ 0x0x7fffffffadc0 { type = __gnu_cxx::__normal_iterator<std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >*, std::__cxx1998::vector<std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >, std::allocator<std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > > > (mutable iterator); state = singular; references sequence with type 'std::__debug::vector<std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >, std::allocator<std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > >' @ 0x0x61a0000bd680 } /usr/include/c++/9/debug/safe_iterator.h:294: In function: __gnu_debug::_Safe_iterator<_Iterator, _Sequence, _Category>::reference __gnu_debug::_Safe_iterator<_Iterator, _Sequence, _Category>::operator*() const [with _Iterator = __gnu_cxx::__normal_iterator<std::__cxx11::basic_string<wchar_t>*, std::__cxx1998::vector<std::__cxx11::basic_string<wchar_t>, std::allocator<std::__cxx11::basic_string<wchar_t> > > >; _Sequence = std::__debug::vector<std::__cxx11::basic_string<wchar_t> >; _Category = std::forward_iterator_tag; __gnu_debug::_Safe_iterator<_Iterator, _Sequence, _Category>::reference = std::__cxx11::basic_string<wchar_t>&] Error: attempt to dereference a singular iterator. Objects involved in the operation: iterator "this" @ 0x0x7fffffffadc0 { type = __gnu_cxx::__normal_iterator<std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >*, std::__cxx1998::vector<std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >, std::allocator<std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > > > (mutable iterator); state = singular; references sequence with type 'std::__debug::vector<std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >, std::allocator<std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > >' @ 0x0x61a0000bd680 } iterator "this" @ 0x0x7fffffffadc0 { type = __gnu_cxx::__normal_iterator<std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >*, std::__cxx1998::vector<std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >, std::allocator<std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > > > (mutable iterator); state = singular; references sequence with type 'std::__debug::vector<std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >, std::allocator<std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > >' @ 0x0x61a0000bd680 } | Jivanmukta <jivanmukta@poczta.onet.pl>: Sep 28 02:18PM +0200
W dniu 28.09.2022 o 13:53, Jivanmukta pisze: > ... > for (auto dir = vendor_frameworks_dirs.begin(); dir != > vendor_frameworks_dirs.end(); ++dir) In a line below I use value of *dir | Juha Nieminen <nospam@thanks.invalid>: Sep 28 12:19PM
> for (auto dir = vendor_frameworks_dirs.begin(); dir != > vendor_frameworks_dirs.end(); ++dir) > Error: Please write and post a minimal full program that demonstrates the problem. | Jivanmukta <jivanmukta@poczta.onet.pl>: Sep 28 05:08PM +0200
W dniu 28.09.2022 o 14:19, Juha Nieminen pisze: >> Error: > Please write and post a minimal full program that demonstrates the > problem. I failed to reproduce problem in isolated code - works fin e. I cannot post my application's source code - it's big. | JiiPee <kerrttuPoistaTama11@gmail.com>: Sep 28 06:52PM +0300
On 28/09/2022 18:08, Jivanmukta wrote: > I cannot post my application's source code - it's big. he is not asking to to post all of it. He is asking to post a short, maybe 10 lines code, where the error exists | JiiPee <kerrttuPoistaTama11@gmail.com>: Sep 28 06:53PM +0300
On 28/09/2022 15:18, Jivanmukta wrote: >> std::vector<std::wstring> vendor_frameworks_dirs; >> ... >> for (auto dir = vendor_frameworks_dirs.begin(); dir != vendor_frameworks_dirs.end(); ++dir) > In a line below I use value of *dir std::vector<std::wstring> vendor_frameworks_dirs; for (auto dir = vendor_frameworks_dirs.begin(); dir != vendor_frameworks_dirs.end(); ++dir) *dir = L"jk"; I am using *dir there, compiles ok | Paavo Helde <eesnimi@osa.pri.ee>: Sep 28 07:21PM +0300
28.09.2022 14:53 Jivanmukta kirjutas: > for (auto dir = vendor_frameworks_dirs.begin(); dir != > vendor_frameworks_dirs.end(); ++dir) > Error: attempt to dereference a singular iterator. Most likely, the size of vendor_frameworks_dirs changes while in the loop, causing reallocation and invalidation of all iterators. Use indexes instead of iterators if this modification happens in your loop, or use proper mutex locks if the modification comes from another thread. | rbowman <bowman@montana.com>: Sep 27 05:30PM -0600
On 9/27/22 10:10, David Brown wrote: > badly written code? If you have code written by people who don't know > how to use "const" properly, you should not let that stop you using it > when it is useful. That is true but dealing with badly written code is part of my life. | Kaz Kylheku <864-117-4973@kylheku.com>: Sep 28 12:26AM
["Followup-To:" header set to comp.lang.c.] > badly written code? If you have code written by people who don't know > how to use "const" properly, you should not let that stop you using it > when it is useful. const requires a modicum of generic programming to use in a satisfactory manner in all circumstances. The problem is that functions with const-qualified pointer arguments accept qualified and unqualified pointers. If they return a pointer into the same object, if they make it const-qualified, it's inconvenient. If they return unqualified, an unsafe cast is required inside the function. The C++ versions of certain C library headers fix this. You can have code like this: const char *ptr = strchr(const_str, 'a'); as well as char *ptr = strchr(non_const_str, 'a'); thanks to there being two C++ overloads for the function. (I'm guessing that the C11 _Generic thing could be used for this, to create a strchr-like macro that has cases for const and non-const.) -- TXR Programming Language: http://nongnu.org/txr Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal | James Kuyper <jameskuyper@alumni.caltech.edu>: Sep 28 01:30AM -0400
On 9/27/22 20:03, Kaz Kylheku wrote: > On 2022-09-27, Scott Lurndal <scott@slp53.sl.home> wrote: ... > That transformation is the job of the compiler, though. > It's not practical to do this even in small programs, let alone > ones in which there are millions of function call expressions. You only do it when the order actually matters, not automatically for all function calls. In every case where the order doesn't matter, that leaves the compiler free to reorder the evaluations in whichever order is most convenient/fastest. | David Brown <david.brown@hesbynett.no>: Sep 28 09:40AM +0200
On 27/09/2022 15:26, Juha Nieminen wrote: > I understand that C++ wants member variables to be initialized in strict > order of declaration (which in the case of C++ in particular can make > quite a difference if those initializations have side effects), I understand that C++ /does/ insist on following the order of declaration - I don't understand /why/. I appreciate that the initialisations could have side effects, so it makes sense that the initialisations are always carried out in the order of declaration - but not that the order must be followed syntactically when writing the constructor. (Alternatively, the language could have said that the initialisations are carried out in the order given in the list in the constructor - either would have worked, as long as it was clear and consistent.) For example, if I have a class containing some ints and doubles, and some flags, then I might want to order the member declarations to pack nicely and match a cache line in total size. But I might prefer the initialisations in constructors to follow a logical order that is different. I fail to see a good reason why that is not allowed. (Again, this is quite possibly just that I am ignorant of the good reason.) > should have allowed any order in the initialization list, and simply > declared that if the initializers are not specified in the same order > as the members have been declared, the behavior is "implementation-defined". Agreed. > being done in any particular order.) > (Another possibility is that it could have made an exception with POD > types, and allow out-of-order initialization with those.) Also possible. | Kaz Kylheku <864-117-4973@kylheku.com>: Sep 28 08:26AM
["Followup-To:" header set to comp.lang.c.] >> ones in which there are millions of function call expressions. > You only do it when the order actually matters, not automatically for > all function calls. OK; I still need the compiler to tell me where those places are; I'm not looking at thousands of function calls to classify them into whether they are stuffed with side effects whose order matters or not. > In every case where the order doesn't matter, that > leaves the compiler free to reorder the evaluations in whichever order > is most convenient/fastest. In cases where the order doesn't matter, the compiler can still reorder the evaluations even if they are expressed in a pattern which constraints the abstract order. The business of unspecified evaluation orders is mostly geared toward helping compilers from 1982 generate better code with less analysis. -- TXR Programming Language: http://nongnu.org/txr Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal | David Brown <david.brown@hesbynett.no>: Sep 28 10:32AM +0200
On 27/09/2022 16:53, Bo Persson wrote: > I belive the strictness here is a do-the-right-thing attempt, avoiding > the constructor initializer list reordering that we have always had. > When adding a new feature, try to avoid the old mistakes! The old mistake (IMHO) is that re-ordering was not allowed, and they are re-making it here. Aggregate initialisation in C++ is already limited to classes without user-declared or inherited constructors. I think you'd have to try hard to make a class for which designated initialisers are allowed, but the order of initialisation or destruction matters. | Bo Persson <bo@bo-persson.se>: Sep 28 10:43AM +0200
On 2022-09-28 at 10:26, Kaz Kylheku wrote: > I'm not looking at thousands of function calls to classify them > into whether they are stuffed with side effects whose order > matters or not. So you write comlicated expressions with lots of side effects, without considering the order of those side effects. Doesn't sound like a good way to write code. | David Brown <david.brown@hesbynett.no>: Sep 28 11:00AM +0200
On 28/09/2022 02:26, Kaz Kylheku wrote: > ["Followup-To:" header set to comp.lang.c.] (Please don't set follow-ups that exclude groups that are clearly relevant and part of the active thread - it just breaks up conversations.) > On 2022-09-27, David Brown <david.brown@hesbynett.no> wrote: >> On 27/09/2022 16:11, rbowman wrote: <snip> > If they return a pointer into the same object, if they make it > const-qualified, it's inconvenient. If they return unqualified, > an unsafe cast is required inside the function. Yes, being "const consistent" can sometimes be awkward. That does not mean avoiding "const" is a good idea - it just means "const" is not quite as simple as one might like. > as well as > char *ptr = strchr(non_const_str, 'a'); > thanks to there being two C++ overloads for the function. Yes. > (I'm guessing that the C11 _Generic thing could be used for this, > to create a strchr-like macro that has cases for const > and non-const.) Yes, _Generic certainly could handle that. | Richard Damon <Richard@Damon-Family.org>: Sep 28 07:56AM -0400
On 9/28/22 3:40 AM, David Brown wrote: > initialisations in constructors to follow a logical order that is > different. I fail to see a good reason why that is not allowed. (Again, > this is quite possibly just that I am ignorant of the good reason.) The problem with the order listed in the constructor is that there might not be just one constructor, but several, that list the order differently. That gives the destructor problems, as it doesn't know what order to destruct the object, and the constructor's implementation might not even be visible at the point of generating the code for the destructor. That forces ALL classes to add hidden members that record the order of construction for this instance of the class, which violates the principle of trying to not pay for things you don't need. Using the order from the class definition is the simple solution. Note, for your class with ints and doubles, it doesn't matter, as the destructor is trivial. | Ben Bacarisse <ben.usenet@bsb.me.uk>: Sep 28 01:33PM +0100
> On 28/09/2022 02:26, Kaz Kylheku wrote: <cut> >> to create a strchr-like macro that has cases for const >> and non-const.) > Yes, _Generic certainly could handle that. And now C23 proposes type-generic versions of strchr etc. -- Ben. | David Brown <david.brown@hesbynett.no>: Sep 28 03:50PM +0200
On 28/09/2022 13:56, Richard Damon wrote: > That forces ALL classes to add hidden members that record the order of > construction for this instance of the class, which violates the > principle of trying to not pay for things you don't need. That all suggests it is a good idea for initialisers to be executed in the order given in the class declaration (since practicality dictates having one fixed order, that seems the sensible choice). It does /not/ suggest that the same order should be required when listing the initialisers. > Using the order from the class definition is the simple solution. > Note, for your class with ints and doubles, it doesn't matter, as the > destructor is trivial. And yet C++ won't let me re-order them in the initialiser list. It will let me use whatever order I want inside the body of the constructor using assignment, and then the compiler will re-order to match exactly the same code that I'd get with initialisers - whatever is the most efficient code. | scott@slp53.sl.home (Scott Lurndal): Sep 28 02:21PM
>using assignment, and then the compiler will re-order to match exactly >the same code that I'd get with initialisers - whatever is the most >efficient code. I suppose that when BS was writing cfront, it wasn't feasible to support different orders for declaration and initialization; subsequent code being sensitive to such, relaxation as compilers became more sophisticated was counterindicated. | scott@slp53.sl.home (Scott Lurndal): Sep 28 04:17PM
>support different orders for declaration and initialization; subsequent >code being sensitive to such, relaxation as compilers became more >sophisticated was counterindicated. Moreover, since function call arguments were passed on a stack, were pushed in reverse order and the target architectures of the day had limited registers, it follows that compiler writers in the day would process arguments in reverse order when generating code. | ram@zedat.fu-berlin.de (Stefan Ram): Sep 28 04:00PM
>>I cannot post my application's source code - it's big. >he is not asking to to post all of it. He is asking to post a short, >maybe 10 lines code, where the error exists Also known as "SSCCE". | FBInCIAnNSATerroristSlayer <FBInCIAnNSATerroristSlayer@yahoo.com>: Sep 28 08:13AM -0700
8 billion humans MUST MASSACRE CIA NSA FBI DHS ARMED FORCES Psychopaths ON SIGHT because - they are PURE EVIL PSYCHOPATHIC THIEVES who will BACK STAB, STEAL YOUR WEALTH and LAND and KILL YOU - they are EVIL PSYCHOPATHS who are SECRETLY CHIPPING millions of americans and global public with DNA MIND CONTROL NANOBOTS and "ENSLAVING THEM FOR LIFE" - they are TORTURING humans with DEWs, Neuroweapons and AI 24x7 and CUNNINGLY accusing the TORTURE VICTIMS to be delusional. because - they have THIS MENTALITY and MODUS OPERANDI Caucasians "Deceiving Natives" with smallpox infested blankets https://www.youtube.com/watch?v=EEHsR63F5Dw "When the Missionaries arrived, the Africans had the land and the Missionaries had the Bible. They taught how to pray with our eyes closed. When we opened them, they had the land and we had the Bible." ― Jomo Kenyatta Hence 8 billion humans have the SELF DEFENSE RIGHT to MERCILESSLY KILL the EVIL US Govt CIA NSA FBI DHS MI5 MI6 ARMED FORCES Psychopaths like FUCKING PIGS, where ever you FIND THEM on the face of this planet. This EVIL motherfucker "Kevin Svenson" belongs to the EVIL SHADOW US Govt Psychopaths former potuses, congressmen, senators WARNED the american public about. This EVIL psychopath KNOWS all these things that Humans will be MERCILESSLY HORRIFICALLY tortured and ENSLAVED SOON with Supercomputer AI, because he is ONE of the SECRET SOCIETY Illuminati psychopaths. Kevin Svenson https://imgur.com/a/Kft2vOD https://twitter.com/HAL_9_Thousand_ https://twitter.com/kevinsvenson_ 4 Hunters Run Broomall PA 19008 USA (610) 325-0169 QUOTES ABOUT THE EVIL INVISIBLE SHADOW US GOVERNMENT by POTUSes, SENATORS AND CONGRESSMEN https://evilciaandnsa.com/quotes-about-invisible-shadow-government-by-potus-senators-n-congressmen/ or QUOTES ABOUT THE EVIL INVISIBLE SHADOW US GOVERNMENT by POTUSes, SENATORS AND CONGRESSMEN https://groups.google.com/g/misc.survivalism/c/Ic3ndj1pZzU/m/Fj7WCQ-zBQAJ The EVIL filthy western confused gender cocksucking anus sucking decadent BACK STABBING white christian motherfuckers at CIA NSA FBI DHS MI6 MI5 have been SECRETLY CHIPPING millions of americans and global public's BRAINS with DNA Mind Control Nanobots and LINKING their brains to NSA HIVE AI Grid for the last 40 years and REMOTELY OPERATING the VICTIMS like fucking PUPPETS, like they operated the CATS in these videos. GATO BAILADOR 1 https://www.youtube.com/watch?v=EERZ8AEya_4 GATO BAILADOR 2 https://www.youtube.com/watch?v=BJAIOICtyyM EVIL back stabbing CIA NSA FBI DHS doctors have been SECRETLY INJECTING these MIND CONTROL NANOBOTS, NANO ROBOTS into your bodies for the LAST 50 years, WITHOUT your knowledge and consent. Renowned Scientist Ray Kurzweil stated that Mind Control technology exists to create a "digital avatar" of any human, and that DIGITAL AVATAR will pass Ray Kurzweil Turing Test. Dr Ray Kurzweil at 1:23 Computer can make a copy of me, I won't even know they scanned my brain from inside, from the blood stream, billions of them in the form of nanobots, nanorobots capture every detail of my synapses and neurotransmitters and create a virtual Ray Kurzweil in a very powerful computer and it will be indistinguishable, it will pass a Ray Kurzweil Turing test. Hyperreality: Linking Targeted Individuals to Artificial Intelligence in a Virtual World https://www.youtube.com/watch?v=hAkB_UX-oYM EVIL WHITE CHRISTIAN CIA NSA FBI DHS Psychopaths are using CELL TOWERS to MIND CONTROL and TORTURE Americans, said Senior DARPA Scientist Dr. Paul Batcho who developed some of these technologies. Senior DARPA Scientist Dr. Paul Batcho REVEALS that US Govt is using Cell Towers to MIND CONTROL public https://groups.google.com/g/uk.sport.cricket/c/0iNAHjlVl_M/m/SGiKjnWNBQAJ Which MEANS american public have the SELF DEFENSE RIGHT to MERCILESSLY MASSACRE the back stabbing, infinitely deceptive WHITE CHRISTIAN CIA NSA FBI DHS "Terrorists, Psychopaths, Sadists, Perverts and BLOOD THIRSTY vermin". The EVIL WHITE CHRISTIAN CIA NSA MI6 FBI DHS ASIS ASIO TERRORISTS and PSYCHOPATHS are RECORDING every thought, emotion and memory in your brains in their Super and Quantum Computers for DECADES. The EVIL CIA NSA MI6 FBI psychopaths are LITERALLY "programming your brains to text, talk, act every day and breaking up your relationships, sabotaging your businesses, careers, destroying your lives all JUST FOR PSYCHOPATHIC FUN and GAMES". EVIL CIA NSA FBI DHS Psychopaths can LITERALLY TURN OFF your brains and make you fall dead, give you ANY brain disease, turn you into confused lunatics. Americans, Brits, Ozzies and Global public have the "SELF DEFENSE RIGHT" to just "MERCILESSLY KILL" the EVIL CIA NSA MI6 MI5 DHS FBI ASIS ASIO CSIS terrorists and psychopaths for BACK STABBING and DESTROYING our FREEDOMS, CIVIL LIBERTIES, HUMAN RIGHTS and for NEURALLY ENSLAVING us while PREACHING and DECEIVING us about democracy on the surface. https://mobile.twitter.com/HAL_9_Thousand_/status/1563397855666372610 In the very near future (before the public realizes it) The vast majority of the human population will be remotely connected to a highly advanced global hive mind. This will be done in a covert manner unseen by most, and it will become intimate part of our lives, known or unknown https://twitter.com/HAL_9_Thousand_/status/1508463707919163396 Are military generals fully aware that a maniacal psychopathic emotionless Supercomputer is in control of millions of people? And it knows how to kill and torture everyone with precision? https://twitter.com/HAL_9_Thousand_/status/1526111452456681474 The plan of the Transhumanist agenda is to gradually absorb all civilians into the Global Brain, takeover the mind of humanity, and then slowly reveal to individual civilians that they are "tuned in" to this Brain machine interface system. #GlobalBrain #WorldSentientSimulation https://twitter.com/HAL_9_Thousand_/status/1515794291867717639 Military / Intelligence black projects have been dispersing Nano-Material into public circulation for decades. It began with experimentation … but is now in prime time full operational use. The human race is secretly being terraformed into a species of biological drones. https://twitter.com/HAL_9_Thousand_ There is currently a technocratic force on earth that believes it's okay to inflict artificial discomfort and pain into my consciousness anytime it wants. It's like ancient times, with slaves, except now "your master" is linked direct-to-brain. … how fun https://twitter.com/HAL_9_Thousand_/status/1533360955530395648 An unknown group of Elites running a shadow government using technical experts to erect a global brain BCI using highly advanced tech systems and networks to take top down control over humanity. Sounds like a movie 🎥 🍿 … but it's here. #BCI #GlobalBrain #NeuroWeapons American BUBBAS with AR15s and M16s SHOULD and MUST MERCILESSLY MASSACRE and SLAUGHTER every CIA NSA FBI DHS MI6 MI5 ASIS ASIO CSIS Psychopath ON SIGHT, without second thoughts, to SAVE american FREEDOMS, CIVIL LIBERTIES, HUMAN RIGHTS. Owning AR15s and M16s is of NO USE, unless you have the BALLS to EXERCISE "YOUR 2nd amendment right" and PROTECT YOURSELF, your families, and your fellow americans/public, and KILL the fucking EVIL CIA NSA FBI DHS Psychopaths. BOMB and KILL EVERY WHITE PSYCHOPATH AT DHS FUSION CENTERS, SECURITY INDUSTRY SPECIALISTS n GREYSTAR PROPERTY MGMT n SAVE American FREEDOMS https://groups.google.com/g/uk.sport.cricket/c/dys-vHQHlV8/m/1agTB4wqBAAJ BOMB THE CIA BUILDING IN LANGLEY VIRGINIA AND MASSACRE THE COCK SUCKING FILTHY EVIL WHITE CIA PSYCHOPATHS LIKE FUCKING PIGS https://groups.google.com/g/uk.sport.cricket/c/8BC-CC0ym5A/m/7HU5Gl5GAQAJ |
|