[L2Ork-dev] End-run around indecipherable C standard docs

Jonathan Wilkes jon.w.wilkes at gmail.com
Wed Jun 6 16:35:23 EDT 2018


Hi list,

It appears that Purr Data uses the following compilers:

1. gcc under Linux
2. clang under OSX
3. gcc via msys2 on Windows

It appears to me that gcc has an extension that allows us
to do type punning through unions:

http://mail-index.netbsd.org/tech-kern/2003/08/11/0001.html

It also appears that clang copies this gcc extension.

So on all the supported platforms, we should be covered
if we use union type punning.

The only alternative to caring about all these compiler
implementations is apparently to cast to char* and use
memcpy, which is stupid.

Can I reasonably move on at this point without having to
decode C99 scrolls (and the even more boring reading of
web blogs attempting to interpret said scrolls)?

-Jonathan


More information about the L2Ork-dev mailing list