> There's no way to verify the integrity of the system, and any malicious app can just grab your banking credentials or enable criminals to unlock and drive away with your car.
I don't see how the second half of the sentence follows from the first half.
Specified by whom? Not the C standard for sure. It is indeed soecified by individual ABIs, and ABIs don't tend to do anything too weird, but that's another question.
looks like I was wrong, but here is the de-facto standard I was relying on over the years ;-). Not that I've memcpied many structs to file directly btw. http://www.catb.org/esr/structure-packing/
The general struct layout algorithm is that you lay out the first member at the address of the struct (this is guaranteed by C), and then subsequent fields in order (also guaranteed by C). What isn't guaranteed is how fields get their alignment, in particular shenanigans you can do with allocating fields in the padding of their prior field, and bitfields in general are horribly underspecified.
In practice, C doesn't do any padding shenanigans, but C++ does (but only for non-POD structs, and then you discover there's several slightly different definitions that mean basically "POD", so have fun predicting which one is the one that actually matters for your use case).
If you sort your fields by size or manually pad them with natural alignment, and use #pragma pack or equivalent non-standard directives that gets you most of the way there. But yes, avoid bitfields.
C++ "standard layout type" is the modern equivalent of "POD" I think.
GP probably meant "POD for the purpose of layout" in the Itanium ABI. It's not the same as standard layout, and POD is not a term in recent C++ standards.
And a last, most sneaky one: At checkout if you pay with credit/debit card don't use Ryanair's "guaranteed exhange rate" if the cost of the flight is not in your card's currency (ticket by default, at least two clicks to find and untick it). That's ~6% gap from mid-market exhange rate, the worst cards do better than that.
There is such a thing. The Chinese Export one was specifically created to intentionally be confusable with the real CE marking (Conformité Européenne). And it works exactly as intended. People see “CE” and think it’s the real CE one but it’s the intentionally confusable one.
This gets parroted all the time, but I have never seen any proof that this is actually true. It's always this one image comparing the two, but never any real example. It's just unreliable sources copying from each other.
There is a conspiracy theory for everyone it seems, even for the educated. No there is no "legitimate" Chinese-mandated CE that can ever be allowed in EU. It would completely destroy the trade relationship and cause Chinese underwriter labs to be completely banned from ever testing for CE marks.
HOWEVER, there are a lot of fake CE marks printed by dodgy companies who make the same shitty products that gets imported via Temu. They are already in the business of selling contraband and dangerous factory seconds, no need for conspiracies to give a legitimate twist to their contraband business.
It really isn't. There is no official "Chinese Export" mark. And it's legal to use the real CE mark just to indicate that you (the manufacturer) believe the product complies with European regulations. Some manufacturers might not know or care what it means and just put it on anyway. And some manufacturers might put a version with the incorrect dimensions on their product. It still doesn't mean "Chinese Export".
I don't see how the second half of the sentence follows from the first half.
reply