From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 65550 invoked by alias); 3 Sep 2015 19:22:19 -0000 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 Received: (qmail 65526 invoked by uid 89); 3 Sep 2015 19:22:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.0 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,LONGWORDS,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-qk0-f178.google.com Received: from mail-qk0-f178.google.com (HELO mail-qk0-f178.google.com) (209.85.220.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 03 Sep 2015 19:22:17 +0000 Received: by qkdv1 with SMTP id v1so25760486qkd.0; Thu, 03 Sep 2015 12:22:15 -0700 (PDT) X-Received: by 10.55.21.40 with SMTP id f40mr40076243qkh.57.1441308134984; Thu, 03 Sep 2015 12:22:14 -0700 (PDT) Received: from [192.168.0.26] (97-122-175-227.hlrn.qwest.net. [97.122.175.227]) by smtp.gmail.com with ESMTPSA id 39sm15450621qkw.33.2015.09.03.12.22.13 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Sep 2015 12:22:14 -0700 (PDT) Message-ID: <55E89DE4.8030609@gmail.com> Date: Thu, 03 Sep 2015 19:32:00 -0000 From: Martin Sebor User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Jonathan Wakely , libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Re: [patch] libstdc++/65473 Make define libstdc++ version macros. References: <20150903105847.GN2631@redhat.com> In-Reply-To: <20150903105847.GN2631@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-09/txt/msg00310.txt.bz2 On 09/03/2015 04:58 AM, Jonathan Wakely wrote: > This change would allow including to be used to check for > __GLIBCXX__ and detect whether youre using libstdc++ or not. Howard > Hinnant recommends including that header for libc++ because it has no > other effects in C++. > > We could make every header include so that > any of them can be used, but I can't be bothered doing that change! > This makes it work for the one header that is recommended to be used, > but of course that doesn't help people using older versions of > libstdc++, who still need to include some other header. > > Is this worth doing? I'd say it's worth doing consistently, in every header. Users are told by others (e.g., on various discussion forums) to expect to be able to check what C++ library implementation they're using by including any C++ standard header and testing the known version macros. Martin PS Out of curiosity I looked to see which headers don't include c++config.g. $ (for f in cassert ccomplex cctype cerrno cfenv cfloat cinttypes ciso646 climits clocale cmath csetjmp csignal cstdalign cstdarg cstdbool cstddef cstdint cstdio cstdlib cstring ctgmath ctime cuchar; do printf " %-20s " "<$f>" && echo "#include <$f>" | ~/bin/gcc-5.1.0/bin/g++ -E -std=c++14 -xc++ - | grep -l "c++config\.h" | wc -l; done ) 0 1 1 0 1 0 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 :1:18: fatal error: cuchar: No such file or directory compilation terminated. 0