From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23465 invoked by alias); 11 Apr 2002 16:26:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 23378 invoked by uid 71); 11 Apr 2002 16:26:00 -0000 Resent-Date: 11 Apr 2002 16:26:00 -0000 Resent-Message-ID: <20020411162600.23377.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, marc-oliver.gewaltig@hre-ftr.f.rd.honda.co.jp Received:(qmail 11000 invoked by uid 61); 11 Apr 2002 16:16:58 -0000 Message-Id:<20020411161658.10999.qmail@sources.redhat.com> Date: Thu, 11 Apr 2002 09:26:00 -0000 From: marc-oliver.gewaltig@hre-ftr.f.rd.honda.co.jp Reply-To: marc-oliver.gewaltig@hre-ftr.f.rd.honda.co.jp To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version:gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/6257: C-library symbols enter global namespace X-SW-Source: 2002-04/txt/msg00615.txt.bz2 List-Id: >Number: 6257 >Category: c++ >Synopsis: C-library symbols enter global namespace >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Thu Apr 11 09:26:00 PDT 2002 >Closed-Date: >Last-Modified: >Originator: marc-oliver.gewaltig@hre-ftr.f.rd.honda.co.jp >Release: unknown-1.0 >Organization: >Environment: Linux (Suse 6.2), Solaris 8, probably all >Description: The C++ standard states that - all C++ header files define their symbols in namespace std - all C header files, used in the form define their symbol in namespace std (Annex D 5.2,3). However, g++ puts C symbols in the global namespace, even if included via headers. >How-To-Repeat: The following version of hello-world should NOT compile with an ISO-14882 compliant compiler #include int main() { // should not work, because printf is in std:: printf("Hello world.\n"); return 0; } >Fix: Put all C symbols in the namespace std, if included by headers. >Release-Note: >Audit-Trail: >Unformatted: