Currently, reading FlatBuffer is completely read-only, so the compiler cannot accept pointer aliases, and this should not cause any problems.
Writing a FlatBuffer is perhaps more complicated, but here, too, each piece of memory is affected only once by a single pointer and is never read, except for comparing vtable in EndTable()(which are read memcmp()).
Then, theoretically, if you first build a FlatBuffer and then read it right away, it will be able to optimize the write and read code and make “evil” optimizations of the kind that Linus referred to in your link above (pretending to never write).
The code is pure wrt -fstrict-aliasing -Wstrict-aliasing=3, not something that gives any kind of guarantee.
- , , - , ( -fno-strict-aliasing:), .