From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24799 invoked by alias); 13 Oct 2012 22:34:46 -0000 Received: (qmail 23780 invoked by uid 22791); 13 Oct 2012 22:34:43 -0000 X-SWARE-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 13 Oct 2012 22:34:38 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1TNAI0-0000fk-KH from joseph_myers@mentor.com ; Sat, 13 Oct 2012 15:34:36 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Sat, 13 Oct 2012 15:34:36 -0700 Received: from digraph.polyomino.org.uk (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.1.289.1; Sat, 13 Oct 2012 23:34:34 +0100 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.76) (envelope-from ) id 1TNAHx-0003ms-9B; Sat, 13 Oct 2012 22:34:33 +0000 Date: Sat, 13 Oct 2012 22:48:00 -0000 From: "Joseph S. Myers" To: Diego Novillo CC: =?UTF-8?B?VG9iaWFzIFNjaGzDvHRlcg==?= , Fortran List , gcc-patches Subject: Re: PR fortran/51727: make module files reproducible, question on C++ in gcc In-Reply-To: <5079B110.6030501@google.com> Message-ID: References: <50796BF5.4060100@physik.uni-muenchen.de> <5079AC23.50608@google.com> <5079AD2B.9000700@physik.uni-muenchen.de> <5079B110.6030501@google.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="-1152306461-1154027594-1350167673=:8590" Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2012-10/txt/msg01323.txt.bz2 ---1152306461-1154027594-1350167673=:8590 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: QUOTED-PRINTABLE Content-length: 1440 On Sat, 13 Oct 2012, Diego Novillo wrote: > On 2012-10-13 14:04 , Tobias Schl=C3=BCter wrote: > > On 2012-10-13 20:00, Diego Novillo wrote: > > > On 2012-10-13 09:26 , Tobias Schl=C3=BCter wrote: > > > > first a question also to non-gfortraners: if I want to use std::map, > > > > where do I "#include "? In system.h? > > >=20 > > > No. Ada includes system.h in pure C code. Why not include it exactly > > > where you need it? > >=20 > > Ok, I was just wondering if there's a rule because a quick grep revealed > > no non-header source file that includes system headers. >=20 > Joseph or others may have reason to create a system.hxx file or some such= , but > in principle I don't see why we shouldn't include std library headers as = we > need them. >=20 > Joseph? The poisoning of various standard library functions that should not be=20 used directly in GCC can be problematic if system headers, using those=20 functions, are included after that poisoning. Thus in general it's better= =20 for system header includes to go in system.h, before the poisoning. In addition, where there is some autoconf configuration about whether to=20 include a header, it's generally preferred to keep down the number of=20 places with such a conditional on host features (encapsulating whatever=20 features the header provides in some way so that other code can use them=20 unconditionally). --=20 Joseph S. Myers joseph@codesourcery.com= ---1152306461-1154027594-1350167673=:8590--