On 26 March 2017 at 17:04, J.W. Jagersma <jwjagersma@xxxxxxxxx> wrote: On 26 March 2017 at 05:39, J.W. Jagersma <jwjagersma@xxxxxxxxx> wrote: >> However I just found that it does compile when it's a .c file, but not >> as a .cpp file. Is __seg_gs only implemented in C for some reason? Yes, that is true according to the docs: https://gcc.gnu.org/onlinedocs/gcc/Named-Address-Spaces.html