[Bug c++/48665] type of const member function

2018-06-20 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48665

--- Comment #19 from Jonathan Wakely  ---
No problem, now that Richard raised it on the core reflector we should see the
implementation divergence fixed, which is a Good Thing.

[Bug c++/48665] type of const member function

2018-06-20 Thread dblaikie at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48665

--- Comment #18 from David Blaikie  ---
Thanks - looks like this got hashed out on the C++ reflector in favor of this
being invalid. The Clang bug has been re-opened to work on the fix there.
Thanks! Sorry for the noise.

[Bug c++/48665] type of const member function

2018-06-19 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48665

--- Comment #17 from Jonathan Wakely  ---
(In reply to David Blaikie from comment #15)
> "The compiler still reuses the same representation for const/volatile and
> for some attributes, sometimes misinterpreting one for the other." - sounds
> like rejecting this valid code is a workaround for that choice of
> representation?

That comment you quoted is explaining why the diagnostic printed "void ()
__attribute__((const))" insetad of "void () const", not why the code should be
rejected. It's not rejected because of a limitation in GCC.

[Bug c++/48665] type of const member function

2018-06-19 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48665

--- Comment #16 from Jonathan Wakely  ---
It's not valid.

[expr.typeid] p5 says typeid(cv T) is the same as typeid(T) but that isn't
relevant here. 'void () const' is not the cv-qualified version of 'void ()',
because there are no cv-qualified function types. See [dcl.fct] p7.

'void () const' is a function type with a cv-qualifier-seq and can only appear
in a few specific places, which does not include a typeid expression. See
[dcl.fct] p6.

[Bug c++/48665] type of const member function

2018-06-19 Thread dblaikie at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48665

David Blaikie  changed:

   What|Removed |Added

 CC||dblaikie at gmail dot com,
   ||richard-gccbugzilla@metafoo
   ||.co.uk

--- Comment #15 from David Blaikie  ---
(jumping in here from https://bugs.llvm.org/show_bug.cgi?id=37846 )

Rejecting 'typeid(void() const)' seems like rejecting valid (if uncommon) code.
Perhaps this should be fixed to accept the code, rather than reject it?

"The compiler still reuses the same representation for const/volatile and for
some attributes, sometimes misinterpreting one for the other." - sounds like
rejecting this valid code is a workaround for that choice of representation?

[Bug c++/48665] type of const member function

2013-04-22 Thread jason at gcc dot gnu.org


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.


[Bug c++/48665] type of const member function

2012-07-02 Thread rguenth at gcc dot gnu.org
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   |---


[Bug c++/48665] type of const member function

2012-03-22 Thread rguenth at gcc dot gnu.org
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.


[Bug c++/48665] type of const member function

2011-11-24 Thread paolo.carlini at oracle dot com
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. ***


[Bug c++/48665] type of const member function

2011-10-10 Thread paolo.carlini at oracle dot com
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.


[Bug c++/48665] type of const member function

2011-10-10 Thread paolo.carlini at oracle dot com
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.


[Bug c++/48665] type of const member function

2011-10-10 Thread ian at gcc dot gnu.org
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=gccview=revrev=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


[Bug c++/48665] type of const member function

2011-10-10 Thread ian at airs dot com
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.


[Bug c++/48665] type of const member function

2011-10-10 Thread marc.glisse at normalesup dot org
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.


[Bug c++/48665] type of const member function

2011-10-10 Thread paolo.carlini at oracle dot com
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 ;)


[Bug c++/48665] type of const member function

2011-10-09 Thread paolo.carlini at oracle dot com
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!


[Bug c++/48665] type of const member function

2011-10-09 Thread ian at airs dot com
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.


[Bug c++/48665] type of const member function

2011-10-09 Thread marc.glisse at normalesup dot org
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?


[Bug c++/48665] type of const member function

2011-09-23 Thread paolo.carlini at oracle dot com
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.


[Bug c++/48665] type of const member function

2011-09-06 Thread marc.glisse at normalesup dot org
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.