public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/36855]  New: __has_trivial_destructor() returns false for reference types.
@ 2008-07-16 18:45 gcc-bugzilla at gcc dot gnu dot org
  2008-07-16 18:59 ` [Bug c++/36855] " paolo dot carlini at oracle dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: gcc-bugzilla at gcc dot gnu dot org @ 2008-07-16 18:45 UTC (permalink / raw)
  To: gcc-bugs


    __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


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

* [Bug c++/36855] __has_trivial_destructor() returns false for reference types.
  2008-07-16 18:45 [Bug c++/36855] New: __has_trivial_destructor() returns false for reference types gcc-bugzilla at gcc dot gnu dot org
@ 2008-07-16 18:59 ` paolo dot carlini at oracle dot com
  2008-07-17  9:12 ` paolo at gcc dot gnu dot org
  2008-07-17  9:14 ` paolo dot carlini at oracle dot com
  2 siblings, 0 replies; 4+ messages in thread
From: paolo dot carlini at oracle dot com @ 2008-07-16 18:59 UTC (permalink / raw)
  To: gcc-bugs



-- 

paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |paolo dot carlini at oracle
                   |dot org                     |dot com
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-07-16 18:58:39
               date|                            |


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


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

* [Bug c++/36855] __has_trivial_destructor() returns false for reference types.
  2008-07-16 18:45 [Bug c++/36855] New: __has_trivial_destructor() returns false for reference types gcc-bugzilla at gcc dot gnu dot org
  2008-07-16 18:59 ` [Bug c++/36855] " paolo dot carlini at oracle dot com
@ 2008-07-17  9:12 ` paolo at gcc dot gnu dot org
  2008-07-17  9:14 ` paolo dot carlini at oracle dot com
  2 siblings, 0 replies; 4+ messages in thread
From: paolo at gcc dot gnu dot org @ 2008-07-17  9:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from paolo at gcc dot gnu dot org  2008-07-17 09:11 -------
Subject: Bug 36855

Author: paolo
Date: Thu Jul 17 09:11:11 2008
New Revision: 137914

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=137914
Log:
/cp
2008-07-17  Paolo Carlini  <paolo.carlini@oracle.com>

        PR c++/36855
        * semantics.c (trait_expr_value): Update __has_trivial_destructor
        semantics to the current WP (N2691).

/testsuite
2008-07-17  Paolo Carlini  <paolo.carlini@oracle.com>

        PR c++/36855
        * g++.dg/ext/has_trivial_destructor.C: Rename to...
        * g++.dg/ext/has_trivial_destructor-1.C: ... this.
        * g++.dg/ext/has_trivial_destructor-2.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/ext/has_trivial_destructor-1.C
      - copied unchanged from r137892,
trunk/gcc/testsuite/g++.dg/ext/has_trivial_destructor.C
    trunk/gcc/testsuite/g++.dg/ext/has_trivial_destructor-2.C
Removed:
    trunk/gcc/testsuite/g++.dg/ext/has_trivial_destructor.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/semantics.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/36855] __has_trivial_destructor() returns false for reference types.
  2008-07-16 18:45 [Bug c++/36855] New: __has_trivial_destructor() returns false for reference types gcc-bugzilla at gcc dot gnu dot org
  2008-07-16 18:59 ` [Bug c++/36855] " paolo dot carlini at oracle dot com
  2008-07-17  9:12 ` paolo at gcc dot gnu dot org
@ 2008-07-17  9:14 ` paolo dot carlini at oracle dot com
  2 siblings, 0 replies; 4+ messages in thread
From: paolo dot carlini at oracle dot com @ 2008-07-17  9:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from paolo dot carlini at oracle dot com  2008-07-17 09:13 -------
Fixed for mainline.


-- 

paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.4.0
            Version|3.0                         |4.3.0


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


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

end of thread, other threads:[~2008-07-17  9:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-16 18:45 [Bug c++/36855] New: __has_trivial_destructor() returns false for reference types gcc-bugzilla at gcc dot gnu dot org
2008-07-16 18:59 ` [Bug c++/36855] " paolo dot carlini at oracle dot com
2008-07-17  9:12 ` paolo at gcc dot gnu dot org
2008-07-17  9:14 ` paolo dot carlini at oracle dot com

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