Home » U++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » Compilation warnings and random crashes
Compilation warnings and random crashes [message #60585] |
Wed, 22 May 2024 00:10 |
Novo
Messages: 1363 Registered: December 2006
|
Ultimate Contributor |
|
|
I get a bunch of warnings like below when compiling on MacOS 10.15:
/Users/XXX/dvlp/cpp/code/upp/git/uppsrc/ide/RepoSync.cpp:283:6: note: use non-reference type 'Upp::KeyValueRef<Upp::String, int>'
for(const auto& w : ~work) {
^~~~~~~~~~~~~~~
Basically, a reference is pointing to a temporary object.
And I'm getting random crashes with TheIDE when launching it on Linux (I'm not using a binary compiled on MacOS )
I guess, these crashes and references to temporary objects are related.
TIA
Regards,
Novo
[Updated on: Tue, 28 May 2024 20:31] Report message to a moderator
|
|
|
Re: Compilation warnings and random crashes [message #60593 is a reply to message #60585] |
Sun, 26 May 2024 06:54 |
Novo
Messages: 1363 Registered: December 2006
|
Ultimate Contributor |
|
|
VectorMap<String, int> work;
work is VectorMap ...
MapKVRange<AMap, K, T> operator~() { return MapKVRange<AMap, K, T>(*this); }
operator~() returns a newly created object.
So, compiler is right: you are referencing temporary objects ...
Regards,
Novo
|
|
|
Goto Forum:
Current Time: Sun Jun 16 13:35:43 CEST 2024
Total time taken to generate the page: 0.01237 seconds
|