From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 95D423894E57; Wed, 29 Apr 2020 18:25:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 95D423894E57 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1588184756; bh=x0CISrG1Q3I7Jz5RNdlwCpLssQkxKBzZ4x7THZLHaqc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=gynCD/oWUGDj5nug0G3am6/p5+sh1iSj7J1JLr6JKogVEz0/MvMN5IpHlJ17h+aAe IZG4kDoE5c6pXg6+FiNjL+LtnF2Gk1vzQiW3SyReWkVRePNIxMWn7wawgd3IGy70u5 NhZSMsTOunu09T2USK/P3svItrZTah8Hj+4Lo/NI= From: "foom at fuhm dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/89855] Inconsistent global namespace overload sets from #include Date: Wed, 29 Apr 2020 18:25:56 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: foom at fuhm dot net X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2020 18:25:56 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D89855 --- Comment #6 from James Y Knight --- Someone has pointed out to me that the standard actually says "name", which= I had internalized as meaning "declaration", but it doesn't. This arguably do= es make the GCC implementation non-compliant with the spec. >>From http://eel.is/c++draft/headers#5 > Except as noted in [library] through [thread] and [depr], the contents of= each header cname is the same as that of the corresponding header name.h a= s specified in the C standard library. In the C++ standard library, however= , the declarations (except for names which are defined as macros in C) are = within namespace scope of the namespace std. It is unspecified whether thes= e names (including any overloads added in [support] through [thread] and [d= epr]) are first declared within the global namespace scope and are then inj= ected into namespace std by explicit using-declarations. I think that text implies that all of the overloads of a particular name mu= st consistently either be defined in the global namespace (and then imported i= nto std with a using-declaration) or defined in the std namespace.=