public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/16630] missing type name in __PRETTY_FUNCTION__
[not found] <bug-16630-1186@http.gcc.gnu.org/bugzilla/>
@ 2010-06-05 20:13 ` gcc-bugzilla at contacts dot eelis dot net
2010-06-05 23:40 ` redi at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: gcc-bugzilla at contacts dot eelis dot net @ 2010-06-05 20:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from gcc-bugzilla at contacts dot eelis dot net 2010-06-05 20:12 -------
Looks fixed in 4.4.1.
--
gcc-bugzilla at contacts dot eelis dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gcc-bugzilla at contacts dot
| |eelis dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16630
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/16630] missing type name in __PRETTY_FUNCTION__
[not found] <bug-16630-1186@http.gcc.gnu.org/bugzilla/>
2010-06-05 20:13 ` [Bug c++/16630] missing type name in __PRETTY_FUNCTION__ gcc-bugzilla at contacts dot eelis dot net
@ 2010-06-05 23:40 ` redi at gcc dot gnu dot org
2010-06-05 23:48 ` manu at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: redi at gcc dot gnu dot org @ 2010-06-05 23:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from redi at gcc dot gnu dot org 2010-06-05 23:39 -------
Indeed, so I'll close this.
4.4 gives
const char* D<U>::foo(typename B<U>::X) [with U = int]
and 4.6 gives
const char* D<U>::foo(typename B<U>::X) [with U = int, typename B<U>::X = int]
--
redi at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Known to work| |4.4.3 4.6.0
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16630
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/16630] missing type name in __PRETTY_FUNCTION__
[not found] <bug-16630-1186@http.gcc.gnu.org/bugzilla/>
2010-06-05 20:13 ` [Bug c++/16630] missing type name in __PRETTY_FUNCTION__ gcc-bugzilla at contacts dot eelis dot net
2010-06-05 23:40 ` redi at gcc dot gnu dot org
@ 2010-06-05 23:48 ` manu at gcc dot gnu dot org
2010-06-06 11:17 ` redi at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: manu at gcc dot gnu dot org @ 2010-06-05 23:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from manu at gcc dot gnu dot org 2010-06-05 23:48 -------
(In reply to comment #7)
> Indeed, so I'll close this.
> 4.4 gives
> const char* D<U>::foo(typename B<U>::X) [with U = int]
> and 4.6 gives
> const char* D<U>::foo(typename B<U>::X) [with U = int, typename B<U>::X = int]
>
Could you add a testcase before closing so we don't regress? I propose:
Index: gcc/testsuite/g++.dg/ext/pretty3.C
===================================================================
--- gcc/testsuite/g++.dg/ext/pretty3.C (revision 0)
+++ gcc/testsuite/g++.dg/ext/pretty3.C (revision 0)
@@ -0,0 +1,19 @@
+// PR c++/16630
+// { dg-do compile }
+// { dg-options "" }
+extern "C" int printf (const char*, ...);
+
+template <class T>
+struct B { typedef T X; };
+
+template <class U>
+struct D
+{
+ const char* foo (typename B<U>::X) { return __PRETTY_FUNCTION__; }
+};
+
+int main ()
+{
+ printf ("%s\n", D<int>().foo (0));
+}
+// { dg-final { scan-assembler "const char\\* D<U>::foo\\(typename
B<U>::X\\).*with U = int, typename B<U>::X = int" } }
--
manu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu dot org
Status|RESOLVED |REOPENED
Resolution|FIXED |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16630
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/16630] missing type name in __PRETTY_FUNCTION__
[not found] <bug-16630-1186@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2010-06-05 23:48 ` manu at gcc dot gnu dot org
@ 2010-06-06 11:17 ` redi at gcc dot gnu dot org
2010-06-13 12:46 ` manu at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: redi at gcc dot gnu dot org @ 2010-06-06 11:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from redi at gcc dot gnu dot org 2010-06-06 11:17 -------
Are we sure we'll always want the "typename B<U>::X = int" part?
Would checking for just "const char* D<U>::foo(typename B<U>::X)" be
preferable?
(I don't know what the convention is for this sort of check)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16630
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/16630] missing type name in __PRETTY_FUNCTION__
[not found] <bug-16630-1186@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2010-06-06 11:17 ` redi at gcc dot gnu dot org
@ 2010-06-13 12:46 ` manu at gcc dot gnu dot org
2010-07-04 18:17 ` manu at gcc dot gnu dot org
2010-07-04 18:20 ` manu at gcc dot gnu dot org
6 siblings, 0 replies; 12+ messages in thread
From: manu at gcc dot gnu dot org @ 2010-06-13 12:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from manu at gcc dot gnu dot org 2010-06-13 12:46 -------
I don't care as long as there is a testcase that tests for this bug. Bugs
shouldn't be closed if a testcase has not been committed that prevents
regressing.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16630
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/16630] missing type name in __PRETTY_FUNCTION__
[not found] <bug-16630-1186@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2010-06-13 12:46 ` manu at gcc dot gnu dot org
@ 2010-07-04 18:17 ` manu at gcc dot gnu dot org
2010-07-04 18:20 ` manu at gcc dot gnu dot org
6 siblings, 0 replies; 12+ messages in thread
From: manu at gcc dot gnu dot org @ 2010-07-04 18:17 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 509 bytes --]
------- Comment #11 from manu at gcc dot gnu dot org 2010-07-04 18:17 -------
Subject: Bug 16630
Author: manu
Date: Sun Jul 4 18:16:59 2010
New Revision: 161805
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=161805
Log:
2010-07-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c++/16630
* g++.dg/ext/pretty3.C: New.
Added:
trunk/gcc/testsuite/g++.dg/ext/pretty3.C
Modified:
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16630
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/16630] missing type name in __PRETTY_FUNCTION__
[not found] <bug-16630-1186@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2010-07-04 18:17 ` manu at gcc dot gnu dot org
@ 2010-07-04 18:20 ` manu at gcc dot gnu dot org
6 siblings, 0 replies; 12+ messages in thread
From: manu at gcc dot gnu dot org @ 2010-07-04 18:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from manu at gcc dot gnu dot org 2010-07-04 18:19 -------
Testcase added. Closing as FIXED.
--
manu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16630
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/16630] New: missing type name in __PRETTY_FUNCTION__
@ 2004-07-19 17:13 sebor at roguewave dot com
2004-07-19 17:26 ` [Bug c++/16630] " bangerth at dealii dot org
` (4 more replies)
0 siblings, 5 replies; 12+ messages in thread
From: sebor at roguewave dot com @ 2004-07-19 17:13 UTC (permalink / raw)
To: gcc-bugs
When compiled with g++ 3.4, the program below produces the following output:
const char* D<U>::foo(typename B<T>::X) [with U = int]
Note that the type T the function argument depends on is not shown. The
expected output (e.g., when compiled with EDG eccp or HP aCC) is something
like:
const char *D<U>::foo(B<U>::X) [with U = int]
extern "C" int printf (const char*, ...);
template <class T>
struct B { typedef T X; };
template <class U>
struct D
{
const char* foo (typename B<U>::X) { return __PRETTY_FUNCTION__; }
};
int main ()
{
printf ("%s\n", D<int>().foo (0));
}
--
Summary: missing type name in __PRETTY_FUNCTION__
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sebor at roguewave dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: all
GCC host triplet: all
GCC target triplet: all
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16630
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/16630] missing type name in __PRETTY_FUNCTION__
2004-07-19 17:13 [Bug c++/16630] New: " sebor at roguewave dot com
@ 2004-07-19 17:26 ` bangerth at dealii dot org
2004-07-19 18:40 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 12+ messages in thread
From: bangerth at dealii dot org @ 2004-07-19 17:26 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2004-07-19 17:26 -------
Confirmed indeed. Though the error is not that it doesn't show the
value of T in
const char* D<U>::foo(typename B<T>::X) [with U = int]
but that it decides to assign two different symbols 'U' and 'T' to the
template parameters, where there is really only one template parameter
around. They need to be printed with the same symbol.
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-07-19 17:26:29
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16630
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/16630] missing type name in __PRETTY_FUNCTION__
2004-07-19 17:13 [Bug c++/16630] New: " sebor at roguewave dot com
2004-07-19 17:26 ` [Bug c++/16630] " bangerth at dealii dot org
@ 2004-07-19 18:40 ` pinskia at gcc dot gnu dot org
2004-07-19 18:44 ` bangerth at dealii dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-19 18:40 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-19 18:40 -------
This problem is caused by the same problem which PR 99 is caused by. Closing as a dup.
*** This bug has been marked as a duplicate of 99 ***
*** This bug has been marked as a duplicate of 99 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16630
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/16630] missing type name in __PRETTY_FUNCTION__
2004-07-19 17:13 [Bug c++/16630] New: " sebor at roguewave dot com
2004-07-19 17:26 ` [Bug c++/16630] " bangerth at dealii dot org
2004-07-19 18:40 ` pinskia at gcc dot gnu dot org
@ 2004-07-19 18:44 ` bangerth at dealii dot org
2004-07-19 18:47 ` pinskia at gcc dot gnu dot org
2004-07-19 18:59 ` bangerth at dealii dot org
4 siblings, 0 replies; 12+ messages in thread
From: bangerth at dealii dot org @ 2004-07-19 18:44 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2004-07-19 18:44 -------
I am not convinced this is the same problem. Andrew, what reasons do you
have to believe that this is the same bug?
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|DUPLICATE |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16630
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/16630] missing type name in __PRETTY_FUNCTION__
2004-07-19 17:13 [Bug c++/16630] New: " sebor at roguewave dot com
` (2 preceding siblings ...)
2004-07-19 18:44 ` bangerth at dealii dot org
@ 2004-07-19 18:47 ` pinskia at gcc dot gnu dot org
2004-07-19 18:59 ` bangerth at dealii dot org
4 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-19 18:47 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-19 18:47 -------
Reading what Christian Ehrhard (the last real comment) had to say causes me to think this is the same
bug.
--
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |99
Status|REOPENED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16630
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/16630] missing type name in __PRETTY_FUNCTION__
2004-07-19 17:13 [Bug c++/16630] New: " sebor at roguewave dot com
` (3 preceding siblings ...)
2004-07-19 18:47 ` pinskia at gcc dot gnu dot org
@ 2004-07-19 18:59 ` bangerth at dealii dot org
4 siblings, 0 replies; 12+ messages in thread
From: bangerth at dealii dot org @ 2004-07-19 18:59 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2004-07-19 18:59 -------
OK, I see. I concede that they may be related. I was surprised by
the fact that run-time and compile-time things should be the same,
but __PRETTY_FUNCTION__ is of course filled at compile time. I had
believed that this PR may be a demangler problem.
Let's keep both of them open, if someone comes around to fix
one of them, she can check the other one as well.
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16630
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2010-07-04 18:20 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-16630-1186@http.gcc.gnu.org/bugzilla/>
2010-06-05 20:13 ` [Bug c++/16630] missing type name in __PRETTY_FUNCTION__ gcc-bugzilla at contacts dot eelis dot net
2010-06-05 23:40 ` redi at gcc dot gnu dot org
2010-06-05 23:48 ` manu at gcc dot gnu dot org
2010-06-06 11:17 ` redi at gcc dot gnu dot org
2010-06-13 12:46 ` manu at gcc dot gnu dot org
2010-07-04 18:17 ` manu at gcc dot gnu dot org
2010-07-04 18:20 ` manu at gcc dot gnu dot org
2004-07-19 17:13 [Bug c++/16630] New: " sebor at roguewave dot com
2004-07-19 17:26 ` [Bug c++/16630] " bangerth at dealii dot org
2004-07-19 18:40 ` pinskia at gcc dot gnu dot org
2004-07-19 18:44 ` bangerth at dealii dot org
2004-07-19 18:47 ` pinskia at gcc dot gnu dot org
2004-07-19 18:59 ` bangerth at dealii 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).