This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/69549] Named Address Spaces does not compile in C++
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 27 Mar 2017 13:26:05 +0000
- Subject: [Bug c++/69549] Named Address Spaces does not compile in C++
- Auto-submitted: auto-generated
- References: <bug-69549-4@http.gcc.gnu.org/bugzilla/>
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.