public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/38888]  New: [C++0x] badly readable diagnostic output with variadic templates
@ 2009-01-16 22:34 bangerth at dealii dot org
  2009-01-16 22:39 ` [Bug c++/38888] " pinskia at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: bangerth at dealii dot org @ 2009-01-16 22:34 UTC (permalink / raw)
  To: gcc-bugs

Maybe it isn't too late yet to change the specification in the ABI (or
maybe there isn't even one yet) for cases like this -- consider
------------------------
template <typename... T> struct X {
    template <typename... U> int f() { this->error; }
};
template int X<int,double>::f<int,double>();
------------------------
We get this error message:

g/x> c++ -std=c++0x -c x.cc
x.cc: In member function 'int X<T>::f() [with U = int, double, T = int,
double]':
x.cc:4:   instantiated from here
x.cc:2: error: 'struct X<int, double>' has no member named 'error'

What bothers me is this bit:
  [with U = int, double, T = int, double]
where it isn't quite clear due to lack of parentheses/braces/... which types
belong where. I think it would be a lot clearer if it read like this:
  [with U = {int, double}, T = {int, double}]

I'm sure it would also make automated parsing of such strings a lot simpler
if someone wanted to do that.

Best
 Wolfgang


-- 
           Summary: [C++0x] badly readable diagnostic output with variadic
                    templates
           Product: gcc
           Version: 4.3.1
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bangerth at dealii dot org


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


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

* [Bug c++/38888] [C++0x] badly readable diagnostic output with variadic templates
  2009-01-16 22:34 [Bug c++/38888] New: [C++0x] badly readable diagnostic output with variadic templates bangerth at dealii dot org
@ 2009-01-16 22:39 ` pinskia at gcc dot gnu dot org
  2009-01-16 22:45 ` jason at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-01-16 22:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2009-01-16 22:38 -------
Well the diagnostic mechanism does not demangle anything, we have the whole
expression in memory still.  So changing the diagnostic is no issue.  Now I
wonder how we (c++filt) demange "_ZN1XIIidEE1fIIidEEEiv" anyways.


-- 


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


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

* [Bug c++/38888] [C++0x] badly readable diagnostic output with variadic templates
  2009-01-16 22:34 [Bug c++/38888] New: [C++0x] badly readable diagnostic output with variadic templates bangerth at dealii dot org
  2009-01-16 22:39 ` [Bug c++/38888] " pinskia at gcc dot gnu dot org
@ 2009-01-16 22:45 ` jason at gcc dot gnu dot org
  2009-01-16 22:47 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-01-16 22:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jason at gcc dot gnu dot org  2009-01-16 22:45 -------
We demangle it as int X<int, double>::f<int, double>()

The suggestion seems reasonable to me.


-- 


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


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

* [Bug c++/38888] [C++0x] badly readable diagnostic output with variadic templates
  2009-01-16 22:34 [Bug c++/38888] New: [C++0x] badly readable diagnostic output with variadic templates bangerth at dealii dot org
  2009-01-16 22:39 ` [Bug c++/38888] " pinskia at gcc dot gnu dot org
  2009-01-16 22:45 ` jason at gcc dot gnu dot org
@ 2009-01-16 22:47 ` pinskia at gcc dot gnu dot org
  2009-01-16 22:50 ` jason at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-01-16 22:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2009-01-16 22:46 -------
(In reply to comment #2)
> We demangle it as int X<int, double>::f<int, double>()

I have to update my c++filt even though it is from August 2008.


-- 


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


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

* [Bug c++/38888] [C++0x] badly readable diagnostic output with variadic templates
  2009-01-16 22:34 [Bug c++/38888] New: [C++0x] badly readable diagnostic output with variadic templates bangerth at dealii dot org
                   ` (2 preceding siblings ...)
  2009-01-16 22:47 ` pinskia at gcc dot gnu dot org
@ 2009-01-16 22:50 ` jason at gcc dot gnu dot org
  2009-01-30 15:29 ` bangerth at gmail dot com
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-01-16 22:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jason at gcc dot gnu dot org  2009-01-16 22:50 -------
Yep, I've been making a bunch of mangling changes recently.  Should be all done
now though.


-- 


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


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

* [Bug c++/38888] [C++0x] badly readable diagnostic output with variadic templates
  2009-01-16 22:34 [Bug c++/38888] New: [C++0x] badly readable diagnostic output with variadic templates bangerth at dealii dot org
                   ` (3 preceding siblings ...)
  2009-01-16 22:50 ` jason at gcc dot gnu dot org
@ 2009-01-30 15:29 ` bangerth at gmail dot com
  2009-10-12 21:55 ` jason at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bangerth at gmail dot com @ 2009-01-30 15:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from bangerth at gmail dot com  2009-01-30 15:29 -------
I think Jason confirmed this already...


-- 

bangerth at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-01-30 15:29:16
               date|                            |


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


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

* [Bug c++/38888] [C++0x] badly readable diagnostic output with variadic templates
  2009-01-16 22:34 [Bug c++/38888] New: [C++0x] badly readable diagnostic output with variadic templates bangerth at dealii dot org
                   ` (4 preceding siblings ...)
  2009-01-30 15:29 ` bangerth at gmail dot com
@ 2009-10-12 21:55 ` jason at gcc dot gnu dot org
  2009-10-17  6:12 ` jason at gcc dot gnu dot org
  2009-10-17 15:41 ` jason at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-10-12 21:55 UTC (permalink / raw)
  To: gcc-bugs



-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement


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


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

* [Bug c++/38888] [C++0x] badly readable diagnostic output with variadic templates
  2009-01-16 22:34 [Bug c++/38888] New: [C++0x] badly readable diagnostic output with variadic templates bangerth at dealii dot org
                   ` (5 preceding siblings ...)
  2009-10-12 21:55 ` jason at gcc dot gnu dot org
@ 2009-10-17  6:12 ` jason at gcc dot gnu dot org
  2009-10-17 15:41 ` jason at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-10-17  6:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jason at gcc dot gnu dot org  2009-10-17 06:12 -------
Subject: Bug 38888

Author: jason
Date: Sat Oct 17 06:11:21 2009
New Revision: 152925

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152925
Log:
        PR c++/38888
        * error.c (dump_template_bindings): Wrap argument packs in {}.

Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/error.c


-- 


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


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

* [Bug c++/38888] [C++0x] badly readable diagnostic output with variadic templates
  2009-01-16 22:34 [Bug c++/38888] New: [C++0x] badly readable diagnostic output with variadic templates bangerth at dealii dot org
                   ` (6 preceding siblings ...)
  2009-10-17  6:12 ` jason at gcc dot gnu dot org
@ 2009-10-17 15:41 ` jason at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-10-17 15:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jason at gcc dot gnu dot org  2009-10-17 15:41 -------
Fixed for 4.5.0.


-- 

jason at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2009-10-17 15:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-16 22:34 [Bug c++/38888] New: [C++0x] badly readable diagnostic output with variadic templates bangerth at dealii dot org
2009-01-16 22:39 ` [Bug c++/38888] " pinskia at gcc dot gnu dot org
2009-01-16 22:45 ` jason at gcc dot gnu dot org
2009-01-16 22:47 ` pinskia at gcc dot gnu dot org
2009-01-16 22:50 ` jason at gcc dot gnu dot org
2009-01-30 15:29 ` bangerth at gmail dot com
2009-10-12 21:55 ` jason at gcc dot gnu dot org
2009-10-17  6:12 ` jason at gcc dot gnu dot org
2009-10-17 15:41 ` 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).