public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/36856]  New: __is_pod() fails for some pod types
@ 2008-07-16 18:54 gcc-bugzilla at gcc dot gnu dot org
  2008-07-16 18:59 ` [Bug c++/36856] " paolo dot carlini at oracle dot com
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: gcc-bugzilla at gcc dot gnu dot org @ 2008-07-16 18:54 UTC (permalink / raw)
  To: gcc-bugs


    The __is_pod() built-in returns false for pod class types that have base
    classes, which is allowed by c++0x.

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:
    Compile the following code as g++ -std=gnu++0x t.cpp

    struct pod_t { };
    struct derived_pod_t : pod_t { };

    typedef char assert [__is_pod (derived_pod_t) ? 1 : -1];


------- Comment #1 from vitek at roguewave dot com  2008-07-16 18:54 -------
Fix:
    No known workaround.


-- 
           Summary: __is_pod() fails for some pod 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=36856


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

* [Bug c++/36856] __is_pod() fails for some pod types
  2008-07-16 18:54 [Bug c++/36856] New: __is_pod() fails for some pod types gcc-bugzilla at gcc dot gnu dot org
@ 2008-07-16 18:59 ` paolo dot carlini at oracle dot com
  2008-07-16 19:01 ` paolo dot carlini at oracle dot com
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ 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:59
               date|                            |


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


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

* [Bug c++/36856] __is_pod() fails for some pod types
  2008-07-16 18:54 [Bug c++/36856] New: __is_pod() fails for some pod types gcc-bugzilla at gcc dot gnu dot org
  2008-07-16 18:59 ` [Bug c++/36856] " paolo dot carlini at oracle dot com
@ 2008-07-16 19:01 ` paolo dot carlini at oracle dot com
  2008-07-16 19:11 ` [Bug c++/36856] [c++0x] " pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: paolo dot carlini at oracle dot com @ 2008-07-16 19:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from paolo dot carlini at oracle dot com  2008-07-16 19:00 -------
Note, I'm going to suspend this, because, besides the traits "builtins" we are
not implementing anything in the front-end having to do with the new
characterization in C++0x of POD.


-- 

paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |SUSPENDED


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


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

* [Bug c++/36856] [c++0x] __is_pod() fails for some pod types
  2008-07-16 18:54 [Bug c++/36856] New: __is_pod() fails for some pod types gcc-bugzilla at gcc dot gnu dot org
  2008-07-16 18:59 ` [Bug c++/36856] " paolo dot carlini at oracle dot com
  2008-07-16 19:01 ` paolo dot carlini at oracle dot com
@ 2008-07-16 19:11 ` pinskia at gcc dot gnu dot org
  2008-07-16 19:27 ` sebor at roguewave dot com
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-07-16 19:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2008-07-16 19:10 -------
derived_pod_t is still a non POD type according to the C++98/C++03 standard.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|3.0                         |4.3.0


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


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

* [Bug c++/36856] [c++0x] __is_pod() fails for some pod types
  2008-07-16 18:54 [Bug c++/36856] New: __is_pod() fails for some pod types gcc-bugzilla at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2008-07-16 19:11 ` [Bug c++/36856] [c++0x] " pinskia at gcc dot gnu dot org
@ 2008-07-16 19:27 ` sebor at roguewave dot com
  2008-07-16 19:30 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: sebor at roguewave dot com @ 2008-07-16 19:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from sebor at roguewave dot com  2008-07-16 19:26 -------
We're using -std=gnu++0x, so we're expecting the implementation to follow
C++ 0x rules.


-- 


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


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

* [Bug c++/36856] [c++0x] __is_pod() fails for some pod types
  2008-07-16 18:54 [Bug c++/36856] New: __is_pod() fails for some pod types gcc-bugzilla at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2008-07-16 19:27 ` sebor at roguewave dot com
@ 2008-07-16 19:30 ` pinskia at gcc dot gnu dot org
  2008-07-16 19:30 ` paolo dot carlini at oracle dot com
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-07-16 19:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pinskia at gcc dot gnu dot org  2008-07-16 19:30 -------
(In reply to comment #4)
> We're using -std=gnu++0x, so we're expecting the implementation to follow
> C++ 0x rules.

Except the ABI says something different from C++0x ...


-- 


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


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

* [Bug c++/36856] [c++0x] __is_pod() fails for some pod types
  2008-07-16 18:54 [Bug c++/36856] New: __is_pod() fails for some pod types gcc-bugzilla at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2008-07-16 19:30 ` pinskia at gcc dot gnu dot org
@ 2008-07-16 19:30 ` paolo dot carlini at oracle dot com
  2008-12-04 14:54 ` jason at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: paolo dot carlini at oracle dot com @ 2008-07-16 19:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from paolo dot carlini at oracle dot com  2008-07-16 19:30 -------
Of course, but really doesn't make sense trying now implementing that, simply
there is no infrastructure in the front-end for C++0x POD-ness, sorry.


-- 


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


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

* [Bug c++/36856] [c++0x] __is_pod() fails for some pod types
  2008-07-16 18:54 [Bug c++/36856] New: __is_pod() fails for some pod types gcc-bugzilla at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2008-07-16 19:30 ` paolo dot carlini at oracle dot com
@ 2008-12-04 14:54 ` jason at gcc dot gnu dot org
  2009-07-16 21:46 ` paolo dot carlini at oracle dot com
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu dot org @ 2008-12-04 14:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jason at gcc dot gnu dot org  2008-12-04 14:51 -------
Suspending this doesn't make much sense to me, it seems like a legitimate bug
in the front end c++0x support.


-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|SUSPENDED                   |NEW
   Last reconfirmed|2008-07-16 18:58:59         |2008-12-04 14:51:57
               date|                            |


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


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

* [Bug c++/36856] [c++0x] __is_pod() fails for some pod types
  2008-07-16 18:54 [Bug c++/36856] New: __is_pod() fails for some pod types gcc-bugzilla at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2008-12-04 14:54 ` jason at gcc dot gnu dot org
@ 2009-07-16 21:46 ` paolo dot carlini at oracle dot com
  2009-07-16 22:07 ` paolo dot carlini at oracle dot com
  2009-07-16 22:10 ` jason at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-07-16 21:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from paolo dot carlini at oracle dot com  2009-07-16 21:46 -------
Jason, I think it's the right time to revisit this PR: after your patch the
testcase passes unconditionally. I'm just wondering if it would make sense to
have a different semantics for __is_pod depending on the -std switch or not...


-- 

paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu dot org
         AssignedTo|paolo dot carlini at oracle |jason at gcc dot gnu dot org
                   |dot com                     |
             Status|NEW                         |ASSIGNED


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


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

* [Bug c++/36856] [c++0x] __is_pod() fails for some pod types
  2008-07-16 18:54 [Bug c++/36856] New: __is_pod() fails for some pod types gcc-bugzilla at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2009-07-16 21:46 ` paolo dot carlini at oracle dot com
@ 2009-07-16 22:07 ` paolo dot carlini at oracle dot com
  2009-07-16 22:10 ` jason at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-07-16 22:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from paolo dot carlini at oracle dot com  2009-07-16 22:06 -------
... probably not, if you ask me. We briefly discussed the issue today, in
relation to the builtins of the same name as provided by other front-ends. We
never tried implementing the exact C++03 semantics: the very idea od the __is_*
builtins started in GCC with the goal of providing the exact semantics for some
of the C++0x type_traits, impossible without compiler support.


-- 


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


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

* [Bug c++/36856] [c++0x] __is_pod() fails for some pod types
  2008-07-16 18:54 [Bug c++/36856] New: __is_pod() fails for some pod types gcc-bugzilla at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2009-07-16 22:07 ` paolo dot carlini at oracle dot com
@ 2009-07-16 22:10 ` jason at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-07-16 22:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from jason at gcc dot gnu dot org  2009-07-16 22:09 -------
Fixed for 4.5.0.


-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.5.0


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


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

end of thread, other threads:[~2009-07-16 22:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-16 18:54 [Bug c++/36856] New: __is_pod() fails for some pod types gcc-bugzilla at gcc dot gnu dot org
2008-07-16 18:59 ` [Bug c++/36856] " paolo dot carlini at oracle dot com
2008-07-16 19:01 ` paolo dot carlini at oracle dot com
2008-07-16 19:11 ` [Bug c++/36856] [c++0x] " pinskia at gcc dot gnu dot org
2008-07-16 19:27 ` sebor at roguewave dot com
2008-07-16 19:30 ` pinskia at gcc dot gnu dot org
2008-07-16 19:30 ` paolo dot carlini at oracle dot com
2008-12-04 14:54 ` jason at gcc dot gnu dot org
2009-07-16 21:46 ` paolo dot carlini at oracle dot com
2009-07-16 22:07 ` paolo dot carlini at oracle dot com
2009-07-16 22:10 ` jason at gcc dot gnu dot 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).