This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/36855] New: __has_trivial_destructor() returns false for reference types.


    __has_trivial_destructor() returns false for all reference types, but
    should return true according to documentation. The documented behavior
    is consistent with what is required by the c++0x draft.

Environment:
System: Linux cranium 2.6.18-8.el5xen #1 SMP Fri Jan 26 14:29:35 EST 2007
x86_64 x86_64 x86_64 GNU/Linux
Architecture: x86_64


host: x86_64-unknown-linux-gnu
build: x86_64-unknown-linux-gnu
target: x86_64-unknown-linux-gnu
configured with: /build/sebor/src/gcc-4.3.0/configure
--prefix=/nfs/devco/contrib/linux/gcc-4.3.0
--with-gmp=/nfs/devco/contrib/linux/gmp-4.2
--with-mpfr=/nfs/devco/contrib/linux/mpfr-2.3.1

How-To-Repeat:
    Attempt to compile the following code as g++ -std=gnu++0x t.cpp

    typedef char assert_0 [__has_trivial_destructor (int&) ? 1 : -1];


------- Comment #1 from vitek at roguewave dot com  2008-07-16 18:45 -------
Fix:
    A workaround would be to use a wrapper template that has a special case
    for reference types.


-- 
           Summary: __has_trivial_destructor() returns false for reference
                    types.
           Product: gcc
           Version: 3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: vitek at roguewave dot com
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36855


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]