public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51210] New: [C++11][DR 547] std::type_info works incorrectly with function types with cv-qualifier-seq
@ 2011-11-18 17:40 daniel.kruegler at googlemail dot com
  2011-11-19 14:07 ` [Bug c++/51210] [C++11][DR 295] " marc.glisse at normalesup dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: daniel.kruegler at googlemail dot com @ 2011-11-18 17:40 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51210
           Summary: [C++11][DR 547] std::type_info works incorrectly with
                    function types with cv-qualifier-seq
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: daniel.kruegler@googlemail.com
                CC: jason@gcc.gnu.org


gcc 4.7 20111112 (experimental) in C++11 mode outputs 

1

in the following program:

//---------------
#include <iostream>
#include <typeinfo>

typedef void FC() const;

int main() {
 std::cout << (typeid(void()) == typeid(FC)) << std::endl;
}
//---------------

As of C++11 it has been clarified that FC still contains the information of a
function that has a const qualifier. There is no evidence from 5.2.8 that says
that

void() const

and

void()

should give std::type_info objects that evaluate to equal.

The program should output

0

instead.

In regard to the upcoming implementation for functions with ref-qualifier the
same constraints should hold, i.e.

//---------------
#include <iostream>
#include <typeinfo>

typedef void FLR() &;
typedef void FRR() &&;

int main() {
 std::cout << (typeid(void()) == typeid(FLR)) << std::endl;
 std::cout << (typeid(void()) == typeid(FRR)) << std::endl;
}
//---------------

should output:

0
0


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

* [Bug c++/51210] [C++11][DR 295] std::type_info works incorrectly with function types with cv-qualifier-seq
  2011-11-18 17:40 [Bug c++/51210] New: [C++11][DR 547] std::type_info works incorrectly with function types with cv-qualifier-seq daniel.kruegler at googlemail dot com
@ 2011-11-19 14:07 ` marc.glisse at normalesup dot org
  2011-11-19 14:37 ` daniel.kruegler at googlemail dot com
  2011-11-24 12:02 ` paolo.carlini at oracle dot com
  2 siblings, 0 replies; 4+ messages in thread
From: marc.glisse at normalesup dot org @ 2011-11-19 14:07 UTC (permalink / raw)
  To: gcc-bugs

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

Marc Glisse <marc.glisse at normalesup dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marc.glisse at normalesup
                   |                            |dot org

--- Comment #1 from Marc Glisse <marc.glisse at normalesup dot org> 2011-11-19 13:56:43 UTC ---
Dup of PR c++/48665 ?


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

* [Bug c++/51210] [C++11][DR 295] std::type_info works incorrectly with function types with cv-qualifier-seq
  2011-11-18 17:40 [Bug c++/51210] New: [C++11][DR 547] std::type_info works incorrectly with function types with cv-qualifier-seq daniel.kruegler at googlemail dot com
  2011-11-19 14:07 ` [Bug c++/51210] [C++11][DR 295] " marc.glisse at normalesup dot org
@ 2011-11-19 14:37 ` daniel.kruegler at googlemail dot com
  2011-11-24 12:02 ` paolo.carlini at oracle dot com
  2 siblings, 0 replies; 4+ messages in thread
From: daniel.kruegler at googlemail dot com @ 2011-11-19 14:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Daniel Krügler <daniel.kruegler at googlemail dot com> 2011-11-19 13:59:18 UTC ---
I agree, this issue seems to be a DUP


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

* [Bug c++/51210] [C++11][DR 295] std::type_info works incorrectly with function types with cv-qualifier-seq
  2011-11-18 17:40 [Bug c++/51210] New: [C++11][DR 547] std::type_info works incorrectly with function types with cv-qualifier-seq daniel.kruegler at googlemail dot com
  2011-11-19 14:07 ` [Bug c++/51210] [C++11][DR 295] " marc.glisse at normalesup dot org
  2011-11-19 14:37 ` daniel.kruegler at googlemail dot com
@ 2011-11-24 12:02 ` paolo.carlini at oracle dot com
  2 siblings, 0 replies; 4+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-11-24 12:02 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-11-24 11:41:19 UTC ---
Let's resolve as dup, then.

*** This bug has been marked as a duplicate of bug 48665 ***


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

end of thread, other threads:[~2011-11-24 11:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-18 17:40 [Bug c++/51210] New: [C++11][DR 547] std::type_info works incorrectly with function types with cv-qualifier-seq daniel.kruegler at googlemail dot com
2011-11-19 14:07 ` [Bug c++/51210] [C++11][DR 295] " marc.glisse at normalesup dot org
2011-11-19 14:37 ` daniel.kruegler at googlemail dot com
2011-11-24 12:02 ` paolo.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).