mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 06:05:58 -06:00
[GH-ISSUE #284] Clang warning #88
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/ultimatepp#88
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @klugier on GitHub (Jun 24, 2025).
Original GitHub issue: https://github.com/ultimatepp/ultimatepp/issues/284
Originally assigned to: @mirek-fidler on GitHub.
It looks like there is a lot of warning on the latest version. It repeates many time (Below are logs from Clock example compilation):
/home/klugier/upp/git/uppsrc/Core/Topt.h (212): warning: first argument in call to 'memmove' is a pointer to non-trivially copyable type 'Upp::TextCtrl::Ln' [-Wnontrivial-memcall]
It looks like it might be a problem of clnag 20.1.6. I recently updated packages on my operating system. On g++ (GCC) 15.1.1 20250425 these warnings are not presetn.
@ismail-yilmaz commented on GitHub (Jun 24, 2025):
Yes, I can confirm this.
@mirek-fidler commented on GitHub (Jun 25, 2025):
Would this help
or
memmove(reintepret_cast<void *>(dst), reinterpret_cast<void *>(src), n * sizeof(T));
?
(If not, we need to implement non-inline memmove_ callin memmove, which will be potentially less optimal).
@klugier commented on GitHub (Jun 25, 2025):
Yes, The first and second variant works and silences warning. However, still there is one more warning to solve (Core/Topt - line 177):
/home/klugier/upp/git/uppsrc/Core/Topt.h (177): warning: first argument in call to 'memcpy' is a pointer to non-trivially copyable type 'Upp::Value' [-Wnontrivial-memcall]
@mirek-fidler commented on GitHub (Jun 25, 2025):
So what do we like better, reinterpret_cast or C style?
On Wed, Jun 25, 2025 at 10:12 PM Zbigniew Rębacz @.***>
wrote:
@klugier commented on GitHub (Jun 25, 2025):
I think you prefer C style casting :) I personally prefer C++ like casting, but do as you like. Also C like casting is shorter. All these C++ casts are long in context of text size.
@mirek-fidler commented on GitHub (Jun 25, 2025):
It feels "low level" and "hack", which is appropriate here :)
On Wed, Jun 25, 2025 at 10:40 PM Zbigniew Rębacz @.***>
wrote:
@klugier commented on GitHub (Jun 26, 2025):
Should we port these changes to latest release? This issue will be observe there especially when somebody pair TheIDE with latest clang. Also, there is a problem with crashing assist, which should also be address https://www.ultimatepp.org/forums/index.php?t=msg&goto=61710&#msg_61710 (optimally also on release).
@klugier commented on GitHub (Jul 2, 2025):
Since now we have both fixes, I think we should port them to stable and create new release. The fixes are:
859a6e2515e4a77b45adThe reason for creating new release is that for some distor with latest clangs and newer the experience won't be good. I would not wait for the new release. Just do 2025.1.1.
@mirek-fidler commented on GitHub (Jul 3, 2025):
https://www.ultimatepp.org/forums/index.php?t=msg&goto=61723&#msg_61723
@ismail-yilmaz commented on GitHub (Jul 3, 2025):
The link in the description is invaild, requires login ("upload"): https://sourceforge.net/projects/upp/upload/upp/2025.1.1rc1/
@mirek-fidler commented on GitHub (Jul 3, 2025):
Thanks
@klugier commented on GitHub (Jul 4, 2025):
I am closing now. Thanks for quick fix and making new release candidate