__seg_gs specifier in g++

陳韋任 chenwj.cs97g@g2.nctu.edu.tw
Wed Mar 29 06:00:00 GMT 2017


Maybe you can write the code needs __seg_gs in C, compile and link it
with other C++ files, as a workaround.

HTH,
chenwj

2017-03-27 21:22 GMT+08:00 J.W. Jagersma <jwjagersma@gmail.com>:
> I don't see any mention of C++ specifically on that page... but is
> there any reason it's not implemented? It would be very useful, right
> now I'm stuck using inline assembly to access non-ds segments.
> Also found this (unanswered) bug report asking about the same thing:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69549
>
> On 27 March 2017 at 12:16, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
>> On 26 March 2017 at 17:04, J.W. Jagersma <jwjagersma@gmail.com> wrote:
>> On 26 March 2017 at 05:39, J.W. Jagersma <jwjagersma@gmail.com> 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



-- 
Wei-Ren Chen (陳韋任)
Homepage: http://people.cs.nctu.edu.tw/~chenwj



More information about the Gcc-help mailing list