[PATCH 2/2] Use C11 _Alignas on scratch_buffer internal buffer

Paul Eggert eggert@cs.ucla.edu
Mon Sep 18 16:10:00 GMT 2017


This patch could cause problems on non-GCC platforms. According to the Gnulib 
documentation 
<https://www.gnu.org/software/gnulib/manual/html_node/stdalign_002eh.html>, Sun 
C 5.11 supports _Alignas but not on auto variables. In practice, the unpatched 
scratch_buffer.h uses 1024-byte buffers everywhere, so the initial buffer size 
will be in sync on all platforms even without the patch. Since the patch adds 
complexity, seems to have no technical advantage, and has potential downsides, I 
suggest leaving that part of scratch_buffer.h alone.



More information about the Libc-alpha mailing list