public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/67195] New: cpp and g++ does not define __GLIBCXX__
@ 2015-08-12 17:59 noloader at gmail dot com
  2015-08-13  8:01 ` [Bug c++/67195] " redi at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: noloader at gmail dot com @ 2015-08-12 17:59 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67195

            Bug ID: 67195
           Summary: cpp and g++ does not define __GLIBCXX__
           Product: gcc
           Version: 5.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: noloader at gmail dot com
  Target Milestone: ---

I'm trying to detect a debug build, and enjoy the benefit of additional
instrumentation:

    # Debug testing
    ifneq ($(filter -DDEBUG -DDEBUG=1 -O0 -O1 -Og,$(CXXFLAGS)),)
      CXXFLAGS += -D_GLIBCXX_DEBUG=1 -D_GLIBCXX_CONCEPT_CHECKS=1
    endif # Debug build

According to Chapter 3. Using Macros
(https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_macros.html):

    __GLIBCXX__

        The current version of libstdc++ in compressed ISO date format, as an
unsigned long.

However, on Fedora22 x86_64:

    $ cpp -x c++ -dM < /dev/null | grep -i lib
    $ cpp -x c++ -dM < /dev/null | grep -i c++
    #define __GLIBCXX_BITSIZE_INT_N_0 128
    #define __GLIBCXX_TYPE_INT_N_0 __int128
    $ cpp -x c++ -dM < /dev/null | grep -i cxx
    #define __GLIBCXX_BITSIZE_INT_N_0 128
    #define __GLIBCXX_TYPE_INT_N_0 __int128
    $ g++ -E -dM - < /dev/null | grep -i lib
    $ g++ -E -dM - < /dev/null | grep -i c++
    $ g++ -E -dM - < /dev/null | grep -i cxx
    $

-----

$ uname -a
Linux localhost.localdomain 4.1.3-201.fc22.x86_64 #1 SMP Wed Jul 29 19:50:22
UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

$ g++ --version
g++ (GCC) 5.1.1 20150618 (Red Hat 5.1.1-4)
Copyright (C) 2015 Free Software Foundation, Inc


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-08-13 14:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-12 17:59 [Bug c++/67195] New: cpp and g++ does not define __GLIBCXX__ noloader at gmail dot com
2015-08-13  8:01 ` [Bug c++/67195] " redi at gcc dot gnu.org
2015-08-13  8:42 ` noloader at gmail dot com
2015-08-13  9:06 ` pinskia at gcc dot gnu.org
2015-08-13  9:08 ` pinskia at gcc dot gnu.org
2015-08-13 10:04 ` noloader at gmail dot com
2015-08-13 14:42 ` redi at gcc dot gnu.org

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).