public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/48665] New: type of const member function
@ 2011-04-18 13:13 marc.glisse at normalesup dot org
  2011-09-06 21:18 ` [Bug c++/48665] " marc.glisse at normalesup dot org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: marc.glisse at normalesup dot org @ 2011-04-18 13:13 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: type of const member function
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: marc.glisse@normalesup.org


typeid reports void() and void()const as the same type:

#include <typeinfo>
#include <iostream>
template<class A,class B> void f(){
        std::cout << std::boolalpha << (typeid(A)==typeid(B)) << '\n';
}
int main(){
        f<void()const,void()>();
}

The demangler in binutils prints void()const as void( const)(). If I make g++
produce an error message (adding a line "typename A::x y;" in f), 4.5 prints
void()const while 4.6 prints void()__attribute__((const)).


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

* [Bug c++/48665] type of const member function
  2011-04-18 13:13 [Bug c++/48665] New: type of const member function marc.glisse at normalesup dot org
@ 2011-09-06 21:18 ` marc.glisse at normalesup dot org
  2011-09-23 21:57 ` paolo.carlini at oracle dot com
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: marc.glisse at normalesup dot org @ 2011-09-06 21:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Marc Glisse <marc.glisse at normalesup dot org> 2011-09-06 21:11:40 UTC ---
Created attachment 25210
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25210
Fix libiberty demangler

This patch seems to fix c++filt. It doesn't change anything to the g++ issues.


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

* [Bug c++/48665] type of const member function
  2011-04-18 13:13 [Bug c++/48665] New: type of const member function marc.glisse at normalesup dot org
  2011-09-06 21:18 ` [Bug c++/48665] " marc.glisse at normalesup dot org
@ 2011-09-23 21:57 ` paolo.carlini at oracle dot com
  2011-10-09 12:34 ` paolo.carlini at oracle dot com
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-09-23 21:57 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |iant at google dot com

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-09-23 21:50:29 UTC ---
Being a demangler patch, Ian should be interested.


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

* [Bug c++/48665] type of const member function
  2011-04-18 13:13 [Bug c++/48665] New: type of const member function marc.glisse at normalesup dot org
  2011-09-06 21:18 ` [Bug c++/48665] " marc.glisse at normalesup dot org
  2011-09-23 21:57 ` paolo.carlini at oracle dot com
@ 2011-10-09 12:34 ` paolo.carlini at oracle dot com
  2011-10-10  4:19 ` ian at airs dot com
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-10-09 12:34 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |paolo.carlini at oracle dot
                   |                            |com

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-10-09 12:33:43 UTC ---
Ian, can I have your opinion about this patch? Thanks in advance!


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

* [Bug c++/48665] type of const member function
  2011-04-18 13:13 [Bug c++/48665] New: type of const member function marc.glisse at normalesup dot org
                   ` (2 preceding siblings ...)
  2011-10-09 12:34 ` paolo.carlini at oracle dot com
@ 2011-10-10  4:19 ` ian at airs dot com
  2011-10-10  5:55 ` marc.glisse at normalesup dot org
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ian at airs dot com @ 2011-10-10  4:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Ian Lance Taylor <ian at airs dot com> 2011-10-10 04:19:03 UTC ---
Created attachment 25451
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25451
Possible patch

It's mainly a matter of style, but this is the approach I prefer.


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

* [Bug c++/48665] type of const member function
  2011-04-18 13:13 [Bug c++/48665] New: type of const member function marc.glisse at normalesup dot org
                   ` (3 preceding siblings ...)
  2011-10-10  4:19 ` ian at airs dot com
@ 2011-10-10  5:55 ` marc.glisse at normalesup dot org
  2011-10-10 13:31 ` paolo.carlini at oracle dot com
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: marc.glisse at normalesup dot org @ 2011-10-10  5:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Marc Glisse <marc.glisse at normalesup dot org> 2011-10-10 05:55:10 UTC ---
(In reply to comment #4)
> It's mainly a matter of style, but this is the approach I prefer.

Thanks, it looks nicer indeed :-)

Would you care to commit (or submit) your patch? Or can I do something to help?


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

* [Bug c++/48665] type of const member function
  2011-04-18 13:13 [Bug c++/48665] New: type of const member function marc.glisse at normalesup dot org
                   ` (4 preceding siblings ...)
  2011-10-10  5:55 ` marc.glisse at normalesup dot org
@ 2011-10-10 13:31 ` paolo.carlini at oracle dot com
  2011-10-10 13:33 ` paolo.carlini at oracle dot com
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-10-10 13:31 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|paolo.carlini at oracle dot |
                   |com                         |

--- Comment #6 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-10-10 13:30:41 UTC ---
Thanks Ian.


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

* [Bug c++/48665] type of const member function
  2011-04-18 13:13 [Bug c++/48665] New: type of const member function marc.glisse at normalesup dot org
                   ` (5 preceding siblings ...)
  2011-10-10 13:31 ` paolo.carlini at oracle dot com
@ 2011-10-10 13:33 ` paolo.carlini at oracle dot com
  2011-10-10 20:35 ` ian at gcc dot gnu.org
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-10-10 13:33 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011-10-10
     Ever Confirmed|0                           |1

--- Comment #7 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-10-10 13:31:07 UTC ---
Confirmed of course.


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

* [Bug c++/48665] type of const member function
  2011-04-18 13:13 [Bug c++/48665] New: type of const member function marc.glisse at normalesup dot org
                   ` (6 preceding siblings ...)
  2011-10-10 13:33 ` paolo.carlini at oracle dot com
@ 2011-10-10 20:35 ` ian at gcc dot gnu.org
  2011-10-10 20:36 ` ian at airs dot com
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ian at gcc dot gnu.org @ 2011-10-10 20:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from ian at gcc dot gnu.org <ian at gcc dot gnu.org> 2011-10-10 20:34:26 UTC ---
Author: ian
Date: Mon Oct 10 20:34:20 2011
New Revision: 179772

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179772
Log:
    PR c++/48665
    * cp-demangle.c (d_cv_qualifiers): If qualifiers are applied to a
    function type, change them to apply to the "this" parameter.
    * testsuite/demangle-expected: Add test case.

Modified:
    trunk/libiberty/ChangeLog
    trunk/libiberty/cp-demangle.c
    trunk/libiberty/testsuite/demangle-expected


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

* [Bug c++/48665] type of const member function
  2011-04-18 13:13 [Bug c++/48665] New: type of const member function marc.glisse at normalesup dot org
                   ` (7 preceding siblings ...)
  2011-10-10 20:35 ` ian at gcc dot gnu.org
@ 2011-10-10 20:36 ` ian at airs dot com
  2011-10-10 21:11 ` marc.glisse at normalesup dot org
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ian at airs dot com @ 2011-10-10 20:36 UTC (permalink / raw)
  To: gcc-bugs

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

Ian Lance Taylor <ian at airs dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |ian at airs dot com
         Resolution|                            |FIXED
   Target Milestone|---                         |4.7.0

--- Comment #9 from Ian Lance Taylor <ian at airs dot com> 2011-10-10 20:35:28 UTC ---
Fixed in mainline.


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

* [Bug c++/48665] type of const member function
  2011-04-18 13:13 [Bug c++/48665] New: type of const member function marc.glisse at normalesup dot org
                   ` (8 preceding siblings ...)
  2011-10-10 20:36 ` ian at airs dot com
@ 2011-10-10 21:11 ` marc.glisse at normalesup dot org
  2011-10-10 21:38 ` paolo.carlini at oracle dot com
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: marc.glisse at normalesup dot org @ 2011-10-10 21:11 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |

--- Comment #10 from Marc Glisse <marc.glisse at normalesup dot org> 2011-10-10 21:10:54 UTC ---
(In reply to comment #9)
> Fixed in mainline.

Thank you very much :-)

Re-opening because the demangler issue was just one (small) part of the bug.
The compiler still reuses the same representation for const/volatile and for
some attributes, sometimes misinterpreting one for the other.


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

* [Bug c++/48665] type of const member function
  2011-04-18 13:13 [Bug c++/48665] New: type of const member function marc.glisse at normalesup dot org
                   ` (9 preceding siblings ...)
  2011-10-10 21:11 ` marc.glisse at normalesup dot org
@ 2011-10-10 21:38 ` paolo.carlini at oracle dot com
  2011-11-24 12:05 ` paolo.carlini at oracle dot com
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-10-10 21:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-10-10 21:37:40 UTC ---
Time to make serious progress on the rest ;)


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

* [Bug c++/48665] type of const member function
  2011-04-18 13:13 [Bug c++/48665] New: type of const member function marc.glisse at normalesup dot org
                   ` (10 preceding siblings ...)
  2011-10-10 21:38 ` paolo.carlini at oracle dot com
@ 2011-11-24 12:05 ` paolo.carlini at oracle dot com
  2012-03-22  8:41 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-11-24 12:05 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |daniel.kruegler at
                   |                            |googlemail dot com

--- Comment #12 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-11-24 11:41:19 UTC ---
*** Bug 51210 has been marked as a duplicate of this bug. ***


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

* [Bug c++/48665] type of const member function
  2011-04-18 13:13 [Bug c++/48665] New: type of const member function marc.glisse at normalesup dot org
                   ` (11 preceding siblings ...)
  2011-11-24 12:05 ` paolo.carlini at oracle dot com
@ 2012-03-22  8:41 ` rguenth at gcc dot gnu.org
  2012-07-02 12:56 ` rguenth at gcc dot gnu.org
  2013-04-22 20:57 ` jason at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-03-22  8:41 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.7.0                       |4.7.1

--- Comment #13 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-03-22 08:26:01 UTC ---
GCC 4.7.0 is being released, adjusting target milestone.


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

* [Bug c++/48665] type of const member function
  2011-04-18 13:13 [Bug c++/48665] New: type of const member function marc.glisse at normalesup dot org
                   ` (12 preceding siblings ...)
  2012-03-22  8:41 ` rguenth at gcc dot gnu.org
@ 2012-07-02 12:56 ` rguenth at gcc dot gnu.org
  2013-04-22 20:57 ` jason at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-07-02 12:56 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.7.1                       |---


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

* [Bug c++/48665] type of const member function
  2011-04-18 13:13 [Bug c++/48665] New: type of const member function marc.glisse at normalesup dot org
                   ` (13 preceding siblings ...)
  2012-07-02 12:56 ` rguenth at gcc dot gnu.org
@ 2013-04-22 20:57 ` jason at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu.org @ 2013-04-22 20:57 UTC (permalink / raw)
  To: gcc-bugs


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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED
         AssignedTo|unassigned at gcc dot       |jason at gcc dot gnu.org
                   |gnu.org                     |
   Target Milestone|---                         |4.9.0

--- Comment #14 from Jason Merrill <jason at gcc dot gnu.org> 2013-04-22 20:57:49 UTC ---
Fixed by rejecting typeid of function-cv-qualified type.  I fixed the
diagnostic issue a while back.


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

end of thread, other threads:[~2013-04-22 20:57 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-18 13:13 [Bug c++/48665] New: type of const member function marc.glisse at normalesup dot org
2011-09-06 21:18 ` [Bug c++/48665] " marc.glisse at normalesup dot org
2011-09-23 21:57 ` paolo.carlini at oracle dot com
2011-10-09 12:34 ` paolo.carlini at oracle dot com
2011-10-10  4:19 ` ian at airs dot com
2011-10-10  5:55 ` marc.glisse at normalesup dot org
2011-10-10 13:31 ` paolo.carlini at oracle dot com
2011-10-10 13:33 ` paolo.carlini at oracle dot com
2011-10-10 20:35 ` ian at gcc dot gnu.org
2011-10-10 20:36 ` ian at airs dot com
2011-10-10 21:11 ` marc.glisse at normalesup dot org
2011-10-10 21:38 ` paolo.carlini at oracle dot com
2011-11-24 12:05 ` paolo.carlini at oracle dot com
2012-03-22  8:41 ` rguenth at gcc dot gnu.org
2012-07-02 12:56 ` rguenth at gcc dot gnu.org
2013-04-22 20:57 ` jason 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).