public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/25185] New: deep typedef substitution in error message
@ 2005-11-30 17:47 dave at boost-consulting dot com
2005-11-30 17:48 ` [Bug c++/25185] " dave at boost-consulting dot com
` (31 more replies)
0 siblings, 32 replies; 33+ messages in thread
From: dave at boost-consulting dot com @ 2005-11-30 17:47 UTC (permalink / raw)
To: gcc-bugs
The enclosed produces the following as part of the error backtrace:
../../../../boost/sequence/make_range.hpp:60: instantiated from
'boost::sequence::range_::range<Elements, Begin, End, typename
boost::result_of<CalcSize ()()>::type>
boost::sequence::detail::range_maker<Elements, Begin, End,
CalcSize>::operator()...
note boost::result_of<CalcSize ()()>::type, which is a typedef name. GCC
should show a "canonical" type name here.
--
Summary: deep typedef substitution in error message
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dave at boost-consulting dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25185
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug c++/25185] deep typedef substitution in error message
2005-11-30 17:47 [Bug c++/25185] New: deep typedef substitution in error message dave at boost-consulting dot com
@ 2005-11-30 17:48 ` dave at boost-consulting dot com
2008-11-06 20:01 ` dave at boost-consulting dot com
` (30 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: dave at boost-consulting dot com @ 2005-11-30 17:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from dave at boost-consulting dot com 2005-11-30 17:48 -------
Created an attachment (id=10370)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10370&action=view)
preprocessed source
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25185
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug c++/25185] deep typedef substitution in error message
2005-11-30 17:47 [Bug c++/25185] New: deep typedef substitution in error message dave at boost-consulting dot com
2005-11-30 17:48 ` [Bug c++/25185] " dave at boost-consulting dot com
@ 2008-11-06 20:01 ` dave at boost-consulting dot com
2008-11-06 20:21 ` dgregor at gcc dot gnu dot org
` (29 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: dave at boost-consulting dot com @ 2008-11-06 20:01 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 7942 bytes --]
------- Comment #2 from dave at boost-consulting dot com 2008-11-06 19:59 -------
This is really a serious problem!
For example, consider this error message I got today. If you look carefully,
you can see the fundamental problem is that two unsigned int lvalues are being
passed to this function call operator. So naturally I'm wondering what types
I'm allowed to pass there. However, the parameter types to the function are
shown as
const boost::property_traits<IndexMap>::key_type &,
and
const boost
::property_traits<
boost::vec_adj_list_vertex_property_map<
boost::adjacency_list<
boost::listS, boost::vecS, boost::directedS, boost
::property<
boost::vertex_name_t, unsigned int, boost::property<
boost::vertex_rank_t, int, boost::no_property> >,
boost::property<
boost::edge_locally_owned_t, bool, boost::property<
boost::edge_target_processor_id_t, int, boost
::property<
boost::edge_weight_t, double, boost
::no_property> > >, boost::no_property, boost
::listS>, boost::adjacency_list<
boost::listS, boost::vecS, boost::directedS, boost
::property<
boost::vertex_name_t, unsigned int, boost::property<
boost::vertex_rank_t, int, boost::no_property> >,
boost::property<
boost::edge_locally_owned_t, bool, boost::property<
boost::edge_target_processor_id_t, int, boost
::property<
boost::edge_weight_t, double, boost
::no_property> > >, boost::no_property, boost
::listS> *, unsigned int, unsigned int &, boost
::vertex_name_t> >::value_type &
!! Naturally, this message is useless for debugging my problem. I don't know
when things changed; GCC never used to do this deep typedef substitution, which
made it my favorite compiler for template programming. *** Please, Please,
Please *** restore the old behavior.
../../../../boost/parallel/detail/ghost_store.hpp:349: error: no match for call
to (
const boost::parallel::distributed_property_map<
boost::parallel::mpi::bsp_process_group, boost::detail::parallel
::global_descriptor_property_map<unsigned int>, boost
::vec_adj_list_vertex_property_map<
boost::adjacency_list<
boost::listS, boost::vecS, boost::directedS, boost
::property<
boost::vertex_name_t, unsigned int, boost::property<
boost::vertex_rank_t, int, boost::no_property> >,
boost::property<
boost::edge_locally_owned_t, bool, boost::property<
boost::edge_target_processor_id_t, int, boost
::property<
boost::edge_weight_t, double, boost
::no_property> > >, boost::no_property, boost
::listS>, boost::adjacency_list<
boost::listS, boost::vecS, boost::directedS, boost
::property<
boost::vertex_name_t, unsigned int, boost::property<
boost::vertex_rank_t, int, boost::no_property> >,
boost::property<
boost::edge_locally_owned_t, bool, boost::property<
boost::edge_target_processor_id_t, int, boost
::property<
boost::edge_weight_t, double, boost
::no_property> > >, boost::no_property, boost
::listS> *, unsigned int, unsigned int &, boost
::vertex_name_t>
>::assimilate_from_reduce<
boost::property_reduce<boost::vertex_name_t>::apply<unsigned int>>)
(unsigned int &, unsigned int &)
../../../../boost/parallel/distributed_property_map.hpp:395: candidates are:
void boost::parallel::distributed_property_map<
boost::parallel::mpi::bsp_process_group, boost::detail::parallel
::global_descriptor_property_map<unsigned int>, boost
::vec_adj_list_vertex_property_map<
boost::adjacency_list<
boost::listS, boost::vecS, boost::directedS, boost::property<
boost::vertex_name_t, unsigned int, boost::property<
boost::vertex_rank_t, int, boost::no_property> >, boost
::property<
boost::edge_locally_owned_t, bool, boost::property<
boost::edge_target_processor_id_t, int,
boost::property<
boost::edge_weight_t, double, boost::no_property> >
>, boost::no_property, boost::listS>, boost::adjacency_list<
boost::listS, boost::vecS, boost::directedS, boost::property<
boost::vertex_name_t, unsigned int, boost::property<
boost::vertex_rank_t, int, boost::no_property> >, boost
::property<
boost::edge_locally_owned_t, bool, boost::property<
boost::edge_target_processor_id_t, int,
boost::property<
boost::edge_weight_t, double, boost::no_property> >
>, boost::no_property, boost::listS> *, unsigned int,
unsigned int &, boost::vertex_name_t>
>::assimilate_from_reduce<
boost::property_reduce<boost::vertex_name_t>::apply<unsigned int> >
::operator()(
const boost::property_traits<IndexMap>::key_type &, const boost
::property_traits<
boost::vec_adj_list_vertex_property_map<
boost::adjacency_list<
boost::listS, boost::vecS, boost::directedS, boost
::property<
boost::vertex_name_t, unsigned int, boost::property<
boost::vertex_rank_t, int, boost::no_property> >,
boost::property<
boost::edge_locally_owned_t, bool, boost::property<
boost::edge_target_processor_id_t, int, boost
::property<
boost::edge_weight_t, double, boost
::no_property> > >, boost::no_property, boost
::listS>, boost::adjacency_list<
boost::listS, boost::vecS, boost::directedS, boost
::property<
boost::vertex_name_t, unsigned int, boost::property<
boost::vertex_rank_t, int, boost::no_property> >,
boost::property<
boost::edge_locally_owned_t, bool, boost::property<
boost::edge_target_processor_id_t, int, boost
::property<
boost::edge_weight_t, double, boost
::no_property> > >, boost::no_property, boost
::listS> *, unsigned int, unsigned int &, boost
::vertex_name_t> >::value_type &) const
--
dave at boost-consulting dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pcarlini at unitus dot it
Version|4.2.0 |4.2.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25185
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug c++/25185] deep typedef substitution in error message
2005-11-30 17:47 [Bug c++/25185] New: deep typedef substitution in error message dave at boost-consulting dot com
2005-11-30 17:48 ` [Bug c++/25185] " dave at boost-consulting dot com
2008-11-06 20:01 ` dave at boost-consulting dot com
@ 2008-11-06 20:21 ` dgregor at gcc dot gnu dot org
2009-03-02 16:20 ` jason at gcc dot gnu dot org
` (28 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: dgregor at gcc dot gnu dot org @ 2008-11-06 20:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from dgregor at gcc dot gnu dot org 2008-11-06 20:19 -------
This bug should be really easy to fix, now that GCC has canonical types. Just
map each of the template type arguments down to its canonical type before doing
the substitution.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25185
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug c++/25185] deep typedef substitution in error message
2005-11-30 17:47 [Bug c++/25185] New: deep typedef substitution in error message dave at boost-consulting dot com
` (2 preceding siblings ...)
2008-11-06 20:21 ` dgregor at gcc dot gnu dot org
@ 2009-03-02 16:20 ` jason at gcc dot gnu dot org
2009-03-02 16:39 ` dave at boost-consulting dot com
` (27 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-03-02 16:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jason at gcc dot gnu dot org 2009-03-02 16:20 -------
Created an attachment (id=17384)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17384&action=view)
patch to disable canonicalization of template type args
type canonicalization is the problem here, not a solution; Dave wants to see
the typedef name, not the canonical name. Does this patch provide the desired
behavior?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25185
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug c++/25185] deep typedef substitution in error message
2005-11-30 17:47 [Bug c++/25185] New: deep typedef substitution in error message dave at boost-consulting dot com
` (3 preceding siblings ...)
2009-03-02 16:20 ` jason at gcc dot gnu dot org
@ 2009-03-02 16:39 ` dave at boost-consulting dot com
2009-03-02 17:01 ` jason at gcc dot gnu dot org
` (26 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: dave at boost-consulting dot com @ 2009-03-02 16:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from dave at boost-consulting dot com 2009-03-02 16:39 -------
Why do you think I want to see the typedef name when I've explicitly asked for
the opposite?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25185
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug c++/25185] deep typedef substitution in error message
2005-11-30 17:47 [Bug c++/25185] New: deep typedef substitution in error message dave at boost-consulting dot com
` (4 preceding siblings ...)
2009-03-02 16:39 ` dave at boost-consulting dot com
@ 2009-03-02 17:01 ` jason at gcc dot gnu dot org
2009-03-02 18:25 ` jason at gcc dot gnu dot org
` (25 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-03-02 17:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jason at gcc dot gnu dot org 2009-03-02 17:01 -------
Poor reading comprehension?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25185
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug c++/25185] deep typedef substitution in error message
2005-11-30 17:47 [Bug c++/25185] New: deep typedef substitution in error message dave at boost-consulting dot com
` (6 preceding siblings ...)
2009-03-02 18:25 ` jason at gcc dot gnu dot org
@ 2009-03-02 18:25 ` jason at gcc dot gnu dot org
2009-03-02 20:24 ` dave at boost-consulting dot com
` (23 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-03-02 18:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from jason at gcc dot gnu dot org 2009-03-02 18:25 -------
Created an attachment (id=17385)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17385&action=view)
patch to print the instantiated signature as well as template/args
Is this more what you're looking for?
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jason at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25185
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug c++/25185] deep typedef substitution in error message
2005-11-30 17:47 [Bug c++/25185] New: deep typedef substitution in error message dave at boost-consulting dot com
` (5 preceding siblings ...)
2009-03-02 17:01 ` jason at gcc dot gnu dot org
@ 2009-03-02 18:25 ` jason at gcc dot gnu dot org
2009-03-02 18:25 ` jason at gcc dot gnu dot org
` (24 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-03-02 18:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from jason at gcc dot gnu dot org 2009-03-02 18:24 -------
Actually this issue has nothing to do with typedefs: rather, for template
instantiations GCC prints out the template signature and then the template
arguments, rather than the signature of the instantiation. What you're seeing
is just the signature of the
boost::sequence::detail::range_maker<...>::operator() template.
This change happened in 1999:
1999-09-28 Gabriel Dos Reis <gdr@codesourcery.com>
Implement function template instantiation pretty printing.
so, before GCC 3.0.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25185
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug c++/25185] deep typedef substitution in error message
2005-11-30 17:47 [Bug c++/25185] New: deep typedef substitution in error message dave at boost-consulting dot com
` (7 preceding siblings ...)
2009-03-02 18:25 ` jason at gcc dot gnu dot org
@ 2009-03-02 20:24 ` dave at boost-consulting dot com
2009-03-02 20:35 ` jason at redhat dot com
` (22 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: dave at boost-consulting dot com @ 2009-03-02 20:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from dave at boost-consulting dot com 2009-03-02 20:24 -------
Hi Jason,
Please assume I know what I'm asking for and stop turning it into a different
problem. Go back and look at the original report more closely, particularly
the part that discusses boost::result_of<CalcSize ()()>::type.
And lastly, I don't know GCC internals, so I'm unable to interpret the result
of your proposed fix (of a problem I'm not having).
Thanks
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25185
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug c++/25185] deep typedef substitution in error message
2005-11-30 17:47 [Bug c++/25185] New: deep typedef substitution in error message dave at boost-consulting dot com
` (8 preceding siblings ...)
2009-03-02 20:24 ` dave at boost-consulting dot com
@ 2009-03-02 20:35 ` jason at redhat dot com
2009-03-02 20:43 ` jason at redhat dot com
` (21 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: jason at redhat dot com @ 2009-03-02 20:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from jason at redhat dot com 2009-03-02 20:35 -------
Subject: Re: deep typedef substitution in error message
dave at boost-consulting dot com wrote:
> Please assume I know what I'm asking for and stop turning it into a different
> problem.
I know what you're asking for. I was explaining what GCC is doing that
is giving you something other than what you want. It isn't that GCC is
preserving typedefs, it's that GCC is dumping the signature of the
template rather than the instantiation.
> Go back and look at the original report more closely, particularly
> the part that discusses boost::result_of<CalcSize ()()>::type.
That comes from here:
typedef range<
Elements
, Begin
, End
, typename result_of<CalcSize()>::type
> type;
template <class L, class B, class E, class C>
type operator()(
L const& m
, B const& b
, E const& e
, C const& s
) const
That's what GCC is printing out. And then it gives the arguments for
all the template parameters. To resolve the typename above GCC would
have to print the instantiated signature, which it currently doesn't do.
> And lastly, I don't know GCC internals, so I'm unable to interpret the result
> of your proposed fix (of a problem I'm not having).
I figured you could apply the patch, rebuild GCC and see if the output
was more to your liking.
Jason
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25185
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug c++/25185] deep typedef substitution in error message
2005-11-30 17:47 [Bug c++/25185] New: deep typedef substitution in error message dave at boost-consulting dot com
` (9 preceding siblings ...)
2009-03-02 20:35 ` jason at redhat dot com
@ 2009-03-02 20:43 ` jason at redhat dot com
2009-04-02 21:39 ` jason at gcc dot gnu dot org
` (20 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: jason at redhat dot com @ 2009-03-02 20:43 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2256 bytes --]
------- Comment #11 from jason at redhat dot com 2009-03-02 20:43 -------
Subject: Re: deep typedef substitution in error message
jason at redhat dot com wrote:
> I figured you could apply the patch, rebuild GCC and see if the output
> was more to your liking.
But I suppose it's easier to just show you the output:
../../../../boost/sequence/make_range.hpp:60: instantiated from
boost::sequence::range_::range<boost::sequence::identity_property_map,
char*, char*, mpl_::integral_c<unsigned int, 5u> >
boost::sequence::detail::range_maker<boost::sequence::identity_property_map,
char*, char*,
boost::sequence::detail::size_difference<boost::array<char, 11u>,
boost::array<char, 6u> > >::operator()(const
boost::sequence::identity_property_map&, char* const&, char* const&,
const boost::sequence::detail::size_difference<boost::array<char, 11u>,
const boost::array<char, 6u> >&) const [instantiated from
boost::sequence::range_::range<Elements, Begin, End, typename
boost::result_of<CalcSize ()()>::type>
boost::sequence::detail::range_maker<Elements, Begin, End,
CalcSize>::operator()(const L&, const B&, const E&, const C&) const with
L = boost::sequence::identity_property_map, B = char*, E = char*, C =
boost::sequence::detail::size_difference<boost::array<char, 11u>, const
boost::array<char, 6u> >, Elements =
boost::sequence::identity_property_map, Begin = char*, End = char*,
CalcSize = boost::sequence::detail::size_difference<boost::array<char,
11u>, boost::array<char, 6u> >]
compared to
../../../../boost/sequence/make_range.hpp:60: instantiated from
boost::sequence::range_::range<Elements, Begin, End, typename
boost::result_of<CalcSize ()()>::type>
boost::sequence::detail::range_maker<Elements, Begin, End,
CalcSize>::operator()(const L&, const B&, const E&, const C&) const
[with L = boost::sequence::identity_property_map, B = char*, E = char*,
C = boost::sequence::detail::size_difference<boost::array<char, 11u>,
const boost::array<char, 6u> >, Elements =
boost::sequence::identity_property_map, Begin = char*, End = char*,
CalcSize = boost::sequence::detail::size_difference<boost::array<char,
11u>, boost::array<char, 6u> >]
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25185
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug c++/25185] deep typedef substitution in error message
2005-11-30 17:47 [Bug c++/25185] New: deep typedef substitution in error message dave at boost-consulting dot com
` (10 preceding siblings ...)
2009-03-02 20:43 ` jason at redhat dot com
@ 2009-04-02 21:39 ` jason at gcc dot gnu dot org
2009-04-02 21:52 ` jason at gcc dot gnu dot org
` (19 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-04-02 21:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from jason at gcc dot gnu dot org 2009-04-02 21:39 -------
Subject: Bug 25185
Author: jason
Date: Thu Apr 2 21:39:00 2009
New Revision: 145476
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145476
Log:
PR c++/25185
* error.c (find_typenames, find_typenames_r): New fns.
(dump_function_decl): Call find_typenames.
(dump_template_bindings): Print typenames as well.
* pt.c (tsubst): Non-static.
* cp-tree.h: Declare it.
Added:
trunk/gcc/testsuite/g++.dg/template/error38.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/error.c
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25185
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug c++/25185] deep typedef substitution in error message
2005-11-30 17:47 [Bug c++/25185] New: deep typedef substitution in error message dave at boost-consulting dot com
` (11 preceding siblings ...)
2009-04-02 21:39 ` jason at gcc dot gnu dot org
@ 2009-04-02 21:52 ` jason at gcc dot gnu dot org
2009-04-02 21:53 ` jason at gcc dot gnu dot org
` (18 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-04-02 21:52 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1748 bytes --]
------- Comment #13 from jason at gcc dot gnu dot org 2009-04-02 21:52 -------
GCC will now say
../../../../boost/sequence/make_range.hpp:60: instantiated from
boost::sequence::detail::range_maker<Elements, Begin, End, CalcSize>::type
boost::sequence::detail::range_maker<Elements, Begin, End,
CalcSize>::operator()(const L&, const B&, const E&, const C&) const [with L =
boost::sequence::intrinsic::iterator_range_operations<boost::array<char, 11u>,
boost::range_iterator<boost::array<char, 11u> > >::elements::type, B = char*, E
= char*, C = boost::sequence::detail::size_difference<boost::array<char, 11u>,
const boost::array<char, 6u> >, Elements =
boost::sequence::identity_property_map, Begin = char*, End = char*, CalcSize =
boost::sequence::detail::size_difference<boost::array<char, 11u>,
boost::array<char, 6u> >, typename boost::result_of<CalcSize()>::type =
boost::detail::get_result_of<boost::sequence::detail::size_difference<boost::array<char,
11u>, boost::array<char, 6u> >,
boost::sequence::detail::size_difference<boost::array<char, 11u>,
boost::array<char, 6u> >(), true>::type]
note the last piece,
typename boost::result_of<CalcSize()>::type =
boost::detail::get_result_of<boost::sequence::detail::size_difference<boost::array<char,
11u>, boost::array<char, 6u> >,
boost::sequence::detail::size_difference<boost::array<char, 11u>,
boost::array<char, 6u> >(), true>::type
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25185
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug c++/25185] deep typedef substitution in error message
2005-11-30 17:47 [Bug c++/25185] New: deep typedef substitution in error message dave at boost-consulting dot com
` (12 preceding siblings ...)
2009-04-02 21:52 ` jason at gcc dot gnu dot org
@ 2009-04-02 21:53 ` jason at gcc dot gnu dot org
2009-04-03 14:09 ` jason at gcc dot gnu dot org
` (17 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-04-02 21:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from jason at gcc dot gnu dot org 2009-04-02 21:53 -------
Where "now" is in 4.5, or a development version thereof.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25185
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug c++/25185] deep typedef substitution in error message
2005-11-30 17:47 [Bug c++/25185] New: deep typedef substitution in error message dave at boost-consulting dot com
` (13 preceding siblings ...)
2009-04-02 21:53 ` jason at gcc dot gnu dot org
@ 2009-04-03 14:09 ` jason at gcc dot gnu dot org
2009-04-03 19:38 ` dave at boost-consulting dot com
` (16 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-04-03 14:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from jason at gcc dot gnu dot org 2009-04-03 14:09 -------
Created an attachment (id=17582)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17582&action=view)
Patch to add -fno-pretty-templates option
Here's a patch for a different approach I tried which just adds a flag to
disable pretty-printing of template functions, in case anyone is interested.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25185
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug c++/25185] deep typedef substitution in error message
2005-11-30 17:47 [Bug c++/25185] New: deep typedef substitution in error message dave at boost-consulting dot com
` (14 preceding siblings ...)
2009-04-03 14:09 ` jason at gcc dot gnu dot org
@ 2009-04-03 19:38 ` dave at boost-consulting dot com
2009-04-03 20:52 ` jason at gcc dot gnu dot org
` (15 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: dave at boost-consulting dot com @ 2009-04-03 19:38 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2085 bytes --]
------- Comment #16 from dave at boost-consulting dot com 2009-04-03 19:38 -------
(In reply to comment #13)
> GCC will now say
>
> ../../../../boost/sequence/make_range.hpp:60: instantiated from
> boost::sequence::detail::range_maker<Elements, Begin, End, CalcSize>::type
> boost::sequence::detail::range_maker<Elements, Begin, End,
> CalcSize>::operator()(const L&, const B&, const E&, const C&) const [with L =
> boost::sequence::intrinsic::iterator_range_operations<boost::array<char, 11u>,
> boost::range_iterator<boost::array<char, 11u> > >::elements::type, B = char*, E
> = char*, C = boost::sequence::detail::size_difference<boost::array<char, 11u>,
> const boost::array<char, 6u> >, Elements =
> boost::sequence::identity_property_map, Begin = char*, End = char*, CalcSize =
> boost::sequence::detail::size_difference<boost::array<char, 11u>,
> boost::array<char, 6u> >, typename boost::result_of<CalcSize()>::type =
> boost::detail::get_result_of<boost::sequence::detail::size_difference<boost::array<char,
> 11u>, boost::array<char, 6u> >,
> boost::sequence::detail::size_difference<boost::array<char, 11u>,
> boost::array<char, 6u> >(), true>::type]
>
> note the last piece,
>
> typename boost::result_of<CalcSize()>::type =
> boost::detail::get_result_of<boost::sequence::detail::size_difference<boost::array<char,
> 11u>, boost::array<char, 6u> >,
> boost::sequence::detail::size_difference<boost::array<char, 11u>,
> boost::array<char, 6u> >(), true>::type
Hi Jason,
I'm afraid that's not an improvement. It remains just as opaque as ever.
Basically, I never want to see a type name ending with
>::identifier
in error messages, or at least, I want a version where the canonical type name
is spelled out.
--
dave at boost-consulting dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|FIXED |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25185
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug c++/25185] deep typedef substitution in error message
2005-11-30 17:47 [Bug c++/25185] New: deep typedef substitution in error message dave at boost-consulting dot com
` (15 preceding siblings ...)
2009-04-03 19:38 ` dave at boost-consulting dot com
@ 2009-04-03 20:52 ` jason at gcc dot gnu dot org
2009-04-03 20:57 ` jason at gcc dot gnu dot org
` (14 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-04-03 20:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #17 from jason at gcc dot gnu dot org 2009-04-03 20:51 -------
Good point, I forgot to strip typedefs in the diagnostic code. I'm testing a
patch that will make that
typename boost::result_of<CalcSize()>::type = mpl_::integral_c<unsigned int,
5u>
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-04-03 20:51:42
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25185
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug c++/25185] deep typedef substitution in error message
2005-11-30 17:47 [Bug c++/25185] New: deep typedef substitution in error message dave at boost-consulting dot com
` (16 preceding siblings ...)
2009-04-03 20:52 ` jason at gcc dot gnu dot org
@ 2009-04-03 20:57 ` jason at gcc dot gnu dot org
2009-04-03 21:46 ` jason at gcc dot gnu dot org
` (13 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-04-03 20:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #18 from jason at gcc dot gnu dot org 2009-04-03 20:57 -------
Hmm, it also looks like a typedef snuck into the L argument somehow, probably
from the recent work on typedef access control. I'll poke at that.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25185
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug c++/25185] deep typedef substitution in error message
2005-11-30 17:47 [Bug c++/25185] New: deep typedef substitution in error message dave at boost-consulting dot com
` (17 preceding siblings ...)
2009-04-03 20:57 ` jason at gcc dot gnu dot org
@ 2009-04-03 21:46 ` jason at gcc dot gnu dot org
2009-04-04 1:33 ` dave at boostpro dot com
` (12 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-04-03 21:46 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1200 bytes --]
------- Comment #19 from jason at gcc dot gnu dot org 2009-04-03 21:45 -------
Fixing that issue (we weren't canonicalizing deduced type arguments) and also
catching typedefs that aren't typenames gives
../../../../boost/sequence/make_range.hpp:60: instantiated from
boost::sequence::detail::range_maker<Elements, Begin, End, CalcSize>::type
boost::sequence::detail::range_maker<Elements, Begin, End,
CalcSize>::operator()(const L&, const B&, const E&, const C&) const [with L =
boost::sequence::identity_property_map; B = char*; E = char*; C =
boost::sequence::detail::size_difference<boost::array<char, 11u>, const
boost::array<char, 6u> >; Elements = boost::sequence::identity_property_map;
Begin = char*; End = char*; CalcSize =
boost::sequence::detail::size_difference<boost::array<char, 11u>,
boost::array<char, 6u> >; boost::sequence::detail::range_maker<Elements, Begin,
End, CalcSize>::type =
boost::sequence::range_::range<boost::sequence::identity_property_map, char*,
char*, mpl_::integral_c<unsigned int, 5u> >; typename
boost::result_of<CalcSize()>::type = mpl_::integral_c<unsigned int, 5u>]
Does that look better?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25185
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug c++/25185] deep typedef substitution in error message
2005-11-30 17:47 [Bug c++/25185] New: deep typedef substitution in error message dave at boost-consulting dot com
` (18 preceding siblings ...)
2009-04-03 21:46 ` jason at gcc dot gnu dot org
@ 2009-04-04 1:33 ` dave at boostpro dot com
2009-04-04 3:46 ` jason at redhat dot com
` (11 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: dave at boostpro dot com @ 2009-04-04 1:33 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3059 bytes --]
------- Comment #20 from dave at boostpro dot com 2009-04-04 01:33 -------
Subject: Re: deep typedef substitution in error message
on Fri Apr 03 2009, "jason at gcc dot gnu dot org"
<gcc-bugzilla-AT-gcc.gnu.org> wrote:
> ------- Comment #19 from jason at gcc dot gnu dot org 2009-04-03 21:45 -------
> Fixing that issue (we weren't canonicalizing deduced type arguments) and also
> catching typedefs that aren't typenames gives
>
> ../../../../boost/sequence/make_range.hpp:60: instantiated from
> Âboost::sequence::detail::range_maker<Elements, Begin, End, CalcSize>::type
> boost::sequence::detail::range_maker<Elements, Begin, End,
> CalcSize>::operator()(const L&, const B&, const E&, const C&) const [with L =
> boost::sequence::identity_property_map; B = char*; E = char*; C =
> boost::sequence::detail::size_difference<boost::array<char, 11u>, const
> boost::array<char, 6u> >; Elements = boost::sequence::identity_property_map;
> Begin = char*; End = char*; CalcSize =
> boost::sequence::detail::size_difference<boost::array<char, 11u>,
> boost::array<char, 6u> >; boost::sequence::detail::range_maker<Elements, Begin,
> End, CalcSize>::type =
> boost::sequence::range_::range<boost::sequence::identity_property_map, char*,
> char*, mpl_::integral_c<unsigned int, 5u> >; typename
> boost::result_of<CalcSize()>::type = mpl_::integral_c<unsigned int, 5u>]Â
>
> Does that look better?
Hum, let me try to reformat that so I can understand it
../../../../boost/sequence/make_range.hpp:60: instantiated from
boost::sequence::detail::range_maker<Elements, Begin, End, CalcSize>::type
boost::sequence::detail::range_maker<
Elements, Begin, End, CalcSize
>::operator()(const L&, const B&, const E&, const C&) const
[with
L = boost::sequence::identity_property_map;
B = char*;
E = char*;
C = boost::sequence::detail::size_difference<
boost::array<char, 11u>, const boost::array<char, 6u> >;
Elements = boost::sequence::identity_property_map;
Begin = char*;
End = char*;
CalcSize = boost::sequence::detail::size_difference<
boost::array<char, 11u>, boost::array<char, 6u> >;
boost::sequence::detail::range_maker<Elements, Begin, End, CalcSize>::type
= boost::sequence::range_::range<
boost::sequence::identity_property_map, char*, char*,
mpl_::integral_c<unsigned int, 5u> >;
typename boost::result_of<CalcSize()>::type = mpl_::integral_c<unsigned
int, 5u>
]
Well, I find that a little confusing. Why is it explaining to me what
typename boost::result_of<CalcSize()>::type
is? I don't see that type anywhere else in there. Also, I'm not
thrilled that
boost::sequence::detail::range_maker<Elements, Begin, End, CalcSize>::type
is still present in the signature, even if it's explained below.
Carried to an extreme, you get EDG's nasty nested
={...={...={...}}}
type descriptions. Do you need to do that? Why not just spell out the
return type?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25185
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug c++/25185] deep typedef substitution in error message
2005-11-30 17:47 [Bug c++/25185] New: deep typedef substitution in error message dave at boost-consulting dot com
` (19 preceding siblings ...)
2009-04-04 1:33 ` dave at boostpro dot com
@ 2009-04-04 3:46 ` jason at redhat dot com
2009-04-04 19:19 ` jason at gcc dot gnu dot org
` (10 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: jason at redhat dot com @ 2009-04-04 3:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #21 from jason at redhat dot com 2009-04-04 03:45 -------
Subject: Re: deep typedef substitution in error message
dave at boostpro dot com wrote:
> Well, I find that a little confusing. Why is it explaining to me what
>
> typename boost::result_of<CalcSize()>::type
>
> is? I don't see that type anywhere else in there.
A bug that I've already fixed.
> Also, I'm not thrilled that
>
> boost::sequence::detail::range_maker<Elements, Begin, End, CalcSize>::type
>
> is still present in the signature, even if it's explained below.
> Carried to an extreme, you get EDG's nasty nested
>
> ={...={...={...}}}
>
> type descriptions. Do you need to do that? Why not just spell out the
> return type?
Because that's the return type specified in the declaration. The
alternative would be for it to say
boost::sequence::range_::range<Elements, Begin, End, typename
boost::result_of<CalcSize()>::type>
like it used to; do you prefer that? It seemed to me that we might as
well just print the typedef in the signature and give the fully
instantiated type in the bindings list rather than give a
still-dependent type in the signature and explain any component
typenames in the bindings list, but I don't feel strongly about that.
Jason
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25185
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug c++/25185] deep typedef substitution in error message
2005-11-30 17:47 [Bug c++/25185] New: deep typedef substitution in error message dave at boost-consulting dot com
` (20 preceding siblings ...)
2009-04-04 3:46 ` jason at redhat dot com
@ 2009-04-04 19:19 ` jason at gcc dot gnu dot org
2009-04-06 9:36 ` dave at boostpro dot com
` (9 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-04-04 19:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #22 from jason at gcc dot gnu dot org 2009-04-04 19:19 -------
Subject: Bug 25185
Author: jason
Date: Sat Apr 4 19:19:30 2009
New Revision: 145550
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145550
Log:
PR c++/25185
* error.c (dump_template_bindings): Look through typedefs in
typename results.
(dump_type) [TYPENAME_TYPE]: Print the typedef name if any.
(find_typenames_r): Also collect typedefs.
* pt.c (unify): Strip typedefs.
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/error.c
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/template/error38.C
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25185
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug c++/25185] deep typedef substitution in error message
2005-11-30 17:47 [Bug c++/25185] New: deep typedef substitution in error message dave at boost-consulting dot com
` (21 preceding siblings ...)
2009-04-04 19:19 ` jason at gcc dot gnu dot org
@ 2009-04-06 9:36 ` dave at boostpro dot com
2009-04-06 15:32 ` jason at redhat dot com
` (8 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: dave at boostpro dot com @ 2009-04-06 9:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #23 from dave at boostpro dot com 2009-04-06 09:35 -------
Subject: Re: deep typedef substitution in error message
On Apr 3, 2009, at 11:45 PM, jason at redhat dot com wrote:
>
>
>> Also, I'm not thrilled that
>>
>> boost::sequence::detail::range_maker<Elements, Begin, End,
>> CalcSize>::type
>>
>> is still present in the signature, even if it's explained below.
>> Carried to an extreme, you get EDG's nasty nested
>>
>> ={...={...={...}}}
>>
>> type descriptions. Do you need to do that? Why not just spell out
>> the
>> return type?
>
> Because that's the return type specified in the declaration. The
> alternative would be for it to say
>
> boost::sequence::range_::range<Elements, Begin, End, typename
> boost::result_of<CalcSize()>::type>
>
> like it used to; do you prefer that?
No, because that contains ">::type"
I'd want to see
boost::sequence::range_::range<Elements, Begin, End,
mpl_::integral_c<unsigned int,5u> >
> It seemed to me that we might as
> well just print the typedef in the signature and give the fully
> instantiated type in the bindings list rather than give a
> still-dependent type in the signature and explain any component
> typenames in the bindings list, but I don't feel strongly about that.
I'm confused as to why you think you need to give a still-dependent
type in the signature
--
David Abrahams
BoostPro Computing
http://boostpro.com
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25185
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug c++/25185] deep typedef substitution in error message
2005-11-30 17:47 [Bug c++/25185] New: deep typedef substitution in error message dave at boost-consulting dot com
` (22 preceding siblings ...)
2009-04-06 9:36 ` dave at boostpro dot com
@ 2009-04-06 15:32 ` jason at redhat dot com
2009-04-07 17:49 ` jason at gcc dot gnu dot org
` (7 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: jason at redhat dot com @ 2009-04-06 15:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #24 from jason at redhat dot com 2009-04-06 15:32 -------
Subject: Re: deep typedef substitution in error message
dave at boostpro dot com wrote:
> I'm confused as to why you think you need to give a still-dependent
> type in the signature
Because the signature we're printing is the signature of the template,
not the specialization.
Jason
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25185
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug c++/25185] deep typedef substitution in error message
2005-11-30 17:47 [Bug c++/25185] New: deep typedef substitution in error message dave at boost-consulting dot com
` (23 preceding siblings ...)
2009-04-06 15:32 ` jason at redhat dot com
@ 2009-04-07 17:49 ` jason at gcc dot gnu dot org
2009-04-08 16:09 ` jason at gcc dot gnu dot org
` (6 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-04-07 17:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #25 from jason at gcc dot gnu dot org 2009-04-07 17:49 -------
Subject: Bug 25185
Author: jason
Date: Tue Apr 7 17:48:52 2009
New Revision: 145697
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145697
Log:
PR c++/25185
* c-common.h, c-common.c: Add flag_pretty_templates.
* c-opts.c (c_common_handle_option): Set it.
* c.opt: Add -fno-pretty-templates.
* doc/invoke.texi (C++ Dialect Options): Likewise.
* error.c (dump_function_decl): Don't pretty-print templates
if -fno-pretty-templates.
(count_non_default_template_args): Print all args if
-fno-pretty-templates.
Added:
trunk/gcc/testsuite/g++.dg/template/error40.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-common.c
trunk/gcc/c-common.h
trunk/gcc/c-opts.c
trunk/gcc/c.opt
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/error.c
trunk/gcc/doc/invoke.texi
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25185
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug c++/25185] deep typedef substitution in error message
2005-11-30 17:47 [Bug c++/25185] New: deep typedef substitution in error message dave at boost-consulting dot com
` (24 preceding siblings ...)
2009-04-07 17:49 ` jason at gcc dot gnu dot org
@ 2009-04-08 16:09 ` jason at gcc dot gnu dot org
2009-04-08 19:32 ` jason at gcc dot gnu dot org
` (5 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-04-08 16:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #26 from jason at gcc dot gnu dot org 2009-04-08 16:08 -------
Subject: Bug 25185
Author: jason
Date: Wed Apr 8 16:08:15 2009
New Revision: 145753
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145753
Log:
PR c++/25185
* error.c (dump_aggr_type): Chase template typedefs if
-fno-pretty-templates.
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/error.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/template/error40.C
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25185
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug c++/25185] deep typedef substitution in error message
2005-11-30 17:47 [Bug c++/25185] New: deep typedef substitution in error message dave at boost-consulting dot com
` (25 preceding siblings ...)
2009-04-08 16:09 ` jason at gcc dot gnu dot org
@ 2009-04-08 19:32 ` jason at gcc dot gnu dot org
2009-04-08 19:38 ` jason at gcc dot gnu dot org
` (4 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-04-08 19:32 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2423 bytes --]
------- Comment #27 from jason at gcc dot gnu dot org 2009-04-08 19:31 -------
I've gone ahead and checked in the -fno-pretty-templates patch, which should
produce
../../../../boost/sequence/make_range.hpp:60: instantiated from
boost::sequence::detail::range_maker<boost::sequence::identity_property_map,
char*, char*, boost::sequence::detail::size_difference<boost::array<char, 11u>,
boost::array<char, 6u> > >::range<boost::sequence::identity_property_map,
char*, char*, mpl_::integral_c<unsigned int, 5u> >
boost::sequence::detail::range_maker<boost::sequence::identity_property_map,
char*, char*, boost::sequence::detail::size_difference<boost::array<char, 11u>,
boost::array<char, 6u> > >::operator()<boost::sequence::identity_property_map,
char*, char*, boost::sequence::detail::size_difference<boost::array<char, 11u>,
const boost::array<char, 6u> > >(const boost::sequence::identity_property_map&,
char* const&, char* const&, const
boost::sequence::detail::size_difference<boost::array<char, 11u>, const
boost::array<char, 6u> >&) const
where compiling without that flag gives
../../../../boost/sequence/make_range.hpp:60: instantiated from
boost::sequence::detail::range_maker<Elements, Begin, End, CalcSize>::type
boost::sequence::detail::range_maker<Elements, Begin, End,
CalcSize>::operator()(const L&, const B&, const E&, const C&) const [with L =
boost::sequence::identity_property_map, B = char*, E = char*, C =
boost::sequence::detail::size_difference<boost::array<char, 11u>, const
boost::array<char, 6u> >, Elements = boost::sequence::identity_property_map,
Begin = char*, End = char*, CalcSize =
boost::sequence::detail::size_difference<boost::array<char, 11u>,
boost::array<char, 6u> >, boost::sequence::detail::range_maker<Elements, Begin,
End, CalcSize>::type =
boost::sequence::range_::range<boost::sequence::identity_property_map, char*,
char*, mpl_::integral_c<unsigned int, 5u> >]
so you can choose which one you want.
I think typedef handling still isn't perfect after these issues; we only strip
typedefs at the top level, and may still print class-scope typedef names in
other contexts, especially since the work to do access control on typedefs in
templates means that class-scope typedefs get a variant type now, so the
typedef name is visible to the diagnostic code in a lot of cases where it
wasn't previously.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25185
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug c++/25185] deep typedef substitution in error message
2005-11-30 17:47 [Bug c++/25185] New: deep typedef substitution in error message dave at boost-consulting dot com
` (26 preceding siblings ...)
2009-04-08 19:32 ` jason at gcc dot gnu dot org
@ 2009-04-08 19:38 ` jason at gcc dot gnu dot org
2009-04-08 19:49 ` dave at boost-consulting dot com
` (3 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-04-08 19:38 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 933 bytes --]
------- Comment #28 from jason at gcc dot gnu dot org 2009-04-08 19:38 -------
Rather, that should be
../../../../boost/sequence/make_range.hpp:60: instantiated from
boost::sequence::range_::range<boost::sequence::identity_property_map, char*,
char*, mpl_::integral_c<unsigned int, 5u> >
boost::sequence::detail::range_maker<boost::sequence::identity_property_map,
char*, char*, boost::sequence::detail::size_difference<boost::array<char, 11u>,
boost::array<char, 6u> > >::operator()<boost::sequence::identity_property_map,
char*, char*, boost::sequence::detail::size_difference<boost::array<char, 11u>,
const boost::array<char, 6u> > >(const boost::sequence::identity_property_map&,
char* const&, char* const&, const
boost::sequence::detail::size_difference<boost::array<char, 11u>, const
boost::array<char, 6u> >&) const
I'm not sure where the other came from.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25185
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug c++/25185] deep typedef substitution in error message
2005-11-30 17:47 [Bug c++/25185] New: deep typedef substitution in error message dave at boost-consulting dot com
` (27 preceding siblings ...)
2009-04-08 19:38 ` jason at gcc dot gnu dot org
@ 2009-04-08 19:49 ` dave at boost-consulting dot com
2009-04-09 2:10 ` jason at redhat dot com
` (2 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: dave at boost-consulting dot com @ 2009-04-08 19:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #29 from dave at boost-consulting dot com 2009-04-08 19:49 -------
Although I really appreciate the fix, I really don't like the name of the
option. "Pretty" templates means something much more like the formatting I
used in http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25185#c2
I can't see why you wouldn't use -fno-deep-typedef-substitution. I'm not
attached to that term, but at least it has an accepted meaning in some circles.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25185
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug c++/25185] deep typedef substitution in error message
2005-11-30 17:47 [Bug c++/25185] New: deep typedef substitution in error message dave at boost-consulting dot com
` (28 preceding siblings ...)
2009-04-08 19:49 ` dave at boost-consulting dot com
@ 2009-04-09 2:10 ` jason at redhat dot com
2009-04-09 13:58 ` dave at boost-consulting dot com
2009-11-03 20:40 ` jason at gcc dot gnu dot org
31 siblings, 0 replies; 33+ messages in thread
From: jason at redhat dot com @ 2009-04-09 2:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #30 from jason at redhat dot com 2009-04-09 02:10 -------
Subject: Re: deep typedef substitution in error message
dave at boost-consulting dot com wrote:
> I can't see why you wouldn't use -fno-deep-typedef-substitution.
Because that isn't at all what the option controls. We strip typedefs
from template arguments regardless of this flag.
Jason
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25185
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug c++/25185] deep typedef substitution in error message
2005-11-30 17:47 [Bug c++/25185] New: deep typedef substitution in error message dave at boost-consulting dot com
` (29 preceding siblings ...)
2009-04-09 2:10 ` jason at redhat dot com
@ 2009-04-09 13:58 ` dave at boost-consulting dot com
2009-11-03 20:40 ` jason at gcc dot gnu dot org
31 siblings, 0 replies; 33+ messages in thread
From: dave at boost-consulting dot com @ 2009-04-09 13:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #31 from dave at boost-consulting dot com 2009-04-09 13:58 -------
OK, I don't get what it's controlling then, but maybe that's not important.
Still, I suggest you choose a more specific name to leave the door open for
"prettier" template printing in the future. If you did introduce indenting or
other prettification that wasn't controlled by this option, it would be
confusing.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25185
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug c++/25185] deep typedef substitution in error message
2005-11-30 17:47 [Bug c++/25185] New: deep typedef substitution in error message dave at boost-consulting dot com
` (30 preceding siblings ...)
2009-04-09 13:58 ` dave at boost-consulting dot com
@ 2009-11-03 20:40 ` jason at gcc dot gnu dot org
31 siblings, 0 replies; 33+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-11-03 20:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #32 from jason at gcc dot gnu dot org 2009-11-03 20:40 -------
(In reply to comment #27)
> we only strip typedefs at the top level
This has now been fixed. I'm going to close this bug now; feel free to reopen
it if you see another instance of the problem in 4.5.
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25185
^ permalink raw reply [flat|nested] 33+ messages in thread
end of thread, other threads:[~2009-11-03 20:40 UTC | newest]
Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-30 17:47 [Bug c++/25185] New: deep typedef substitution in error message dave at boost-consulting dot com
2005-11-30 17:48 ` [Bug c++/25185] " dave at boost-consulting dot com
2008-11-06 20:01 ` dave at boost-consulting dot com
2008-11-06 20:21 ` dgregor at gcc dot gnu dot org
2009-03-02 16:20 ` jason at gcc dot gnu dot org
2009-03-02 16:39 ` dave at boost-consulting dot com
2009-03-02 17:01 ` jason at gcc dot gnu dot org
2009-03-02 18:25 ` jason at gcc dot gnu dot org
2009-03-02 18:25 ` jason at gcc dot gnu dot org
2009-03-02 20:24 ` dave at boost-consulting dot com
2009-03-02 20:35 ` jason at redhat dot com
2009-03-02 20:43 ` jason at redhat dot com
2009-04-02 21:39 ` jason at gcc dot gnu dot org
2009-04-02 21:52 ` jason at gcc dot gnu dot org
2009-04-02 21:53 ` jason at gcc dot gnu dot org
2009-04-03 14:09 ` jason at gcc dot gnu dot org
2009-04-03 19:38 ` dave at boost-consulting dot com
2009-04-03 20:52 ` jason at gcc dot gnu dot org
2009-04-03 20:57 ` jason at gcc dot gnu dot org
2009-04-03 21:46 ` jason at gcc dot gnu dot org
2009-04-04 1:33 ` dave at boostpro dot com
2009-04-04 3:46 ` jason at redhat dot com
2009-04-04 19:19 ` jason at gcc dot gnu dot org
2009-04-06 9:36 ` dave at boostpro dot com
2009-04-06 15:32 ` jason at redhat dot com
2009-04-07 17:49 ` jason at gcc dot gnu dot org
2009-04-08 16:09 ` jason at gcc dot gnu dot org
2009-04-08 19:32 ` jason at gcc dot gnu dot org
2009-04-08 19:38 ` jason at gcc dot gnu dot org
2009-04-08 19:49 ` dave at boost-consulting dot com
2009-04-09 2:10 ` jason at redhat dot com
2009-04-09 13:58 ` dave at boost-consulting dot com
2009-11-03 20:40 ` 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).