https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69549
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2017-03-27 Ever confirmed|0 |1 --- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Thiago Macieira from comment #0) > It works in C: > > $ cat test.c > __seg_gs char * ptr; > $ gcc -c test.c && echo Success > Success It's documenbted as being a feature in GNU C, and it doesn't say it's also supported for C++. > But not in C++: > > $ gcc -xc++ -c test.c > test.c:1:1: error: ‘__seg_gs’ does not name a type > > Even though it's advertised as supported: > > $ gcc -xc++ -dM -E /dev/null | grep SEG_GS > #define __SEG_GS 1 That seems persuasive. Either the macro shouldn't be defined or it should be supported.