tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] [PATCH] stdatomic: ld/st/xchg/cmpxchg on simple types


From: Dmitry Selyutin
Subject: Re: [Tinycc-devel] [PATCH] stdatomic: ld/st/xchg/cmpxchg on simple types
Date: Sat, 20 Mar 2021 14:18:18 +0300

This needs casts, both sign- and type-wise, e.g. signed long long to unsigned char, and has no way to enforce type safety, even in the minimal form. A minimally suitable form would require a statement _expression_, plus typeof, and even then it would have to be tuned to work with types that are binary compatible (at least casts are needed). I don't see that many benefits there. This is a deceptive simplicity which doesn't buy you much after all. Per-type functions, on the other hand, are known to be generated by other compilers, so you can be compatible with the code they produce, whilst keeping other pros, like type deduction and using zero non-portable extensions.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]