public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "thiago at kde dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/69549] Named Address Spaces does not compile in C++
Date: Tue, 23 Mar 2021 01:36:18 +0000 [thread overview]
Message-ID: <bug-69549-4-hZRsyy5MSP@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-69549-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69549
--- Comment #7 from Thiago Macieira <thiago at kde dot org> ---
(In reply to Andrew Pinski from comment #6)
> The above is not the reason why namespaces are not handled in GCC's C++
> front-end. The reason why they are not handled in C++ is because you need
> to handle them in overloads and templates correctly. Does clang handle
> those correctly or does it ignore that issue?
It handles them:
$ clang -O2 -S -o - -include stdint.h -xc++ - <<<'template <typename T> void
f(T); void f() { auto tib = (void * __seg_fs*)(0); f(tib); }' | c++filt
.text
.file "-"
.globl f() # -- Begin function f()
.p2align 4, 0x90
.type f(),@function
f(): # @f()
.cfi_startproc
# %bb.0:
xorl %edi, %edi
jmp void f<void* AS257*>(void* AS257*) # TAILCALL
The mangled symbol was _Z1fIPU5AS257PvEvT_. That "AS257" is encoded as U5AS257,
which is an extended qualifier.
<https://itanium-cxx-abi.github.io/cxx-abi/abi.html#mangle.qualified-type>:
5.1.5.1 Qualified types
<qualified-type> ::= <qualifiers> <type>
<qualifiers> ::= <extended-qualifier>* <CV-qualifiers>
<extended-qualifier> ::= U <source-name> [<template-args>] # vendor extended
type qualifier
<CV-qualifiers> ::= [r] [V] [K] # restrict (C99), volatile, const
<ref-qualifier> ::= R # & ref-qualifier
<ref-qualifier> ::= O # && ref-qualifier
next prev parent reply other threads:[~2021-03-23 1:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-69549-4@http.gcc.gnu.org/bugzilla/>
2021-03-22 17:31 ` thiago at kde dot org
2021-03-22 17:43 ` thiago at kde dot org
2021-03-22 20:20 ` pinskia at gcc dot gnu.org
2021-03-23 1:36 ` thiago at kde dot org [this message]
2021-11-16 13:00 ` jwjagersma at gmail dot com
2021-11-20 0:31 ` jwjagersma at gmail dot com
2023-11-02 1:38 ` abelay at mit dot edu
2023-11-02 4:52 ` xry111 at gcc dot gnu.org
2023-11-02 12:40 ` jwjagersma at gmail dot com
2023-11-21 1:25 ` pinskia at gcc dot gnu.org
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-69549-4-hZRsyy5MSP@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).