[Development] QProperty and library coding guide

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Sun Jul 19 13:20:12 CEST 2020


Il 19/07/20 12:51, Oswald Buddenhagen ha scritto:
> - the compiler becomes intentionally belligerent, in which case an
>     override switch will be provided as well (if not instantly, then after
>     the outcry that immediately follows)

File under "surely no compiler will optimize away X!", for X in

* unspecified pointer comparisons
* signed integer over/underflows
* data races (on bitfields)
* volatile in lieu of proper atomic access
* proving that a loop doesn't terminate, hence the loop is never 
entered, and applying dead code optimization to it
* ...

To do any of the above is not belligerent, AND you have no way to switch 
the above optimizations off. (Also, you don't want to.)

In other words: this is playing with fire in the long term run, that's 
why I suggested to bypass the C++ abstract machine, rely on ABI and use ASM.

My 2 c,
-- 
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4329 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/development/attachments/20200719/cf6930b8/attachment.bin>


More information about the Development mailing list