From: Nick Bowler Date: Mon, 23 Jan 2023 04:34:16 +0000 (-0500) Subject: xtra: Avoid undefined ## usage. X-Git-Url: http://git.draconx.ca/gitweb/dxcommon.git/commitdiff_plain/e1ebfe7f258c1c99006fee8a3b6e111dc1d34d79?hp=e1ebfe7f258c1c99006fee8a3b6e111dc1d34d79 xtra: Avoid undefined ## usage. According to the C spec, every use of the ## operator has to produce a valid preprocessing token, otherwise the behaviour is undefined. It is not enough to merely ensure that a sequence of ## operators results in a valid token at the end. This matters in practice, as at least some versions of the Sun Studio compiler will turn: #define PASTE(a, b) a ## b #define PASTE2(a, b) PASTE(a, b) PASTE2(uint_least, PASTE(8, _t)) into two tokens: uint_least8 _t instead of uint_least8_t as desired. The results are not good for the XTRA_PACKED_LOPTS macro. Fortunately, it is straightforward to rearrange the expansions to avoid this problem. ---