public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pluto at agmk dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/14912] Do not print default template arguments in error messages
Date: Thu, 25 Sep 2008 13:21:00 -0000	[thread overview]
Message-ID: <20080925132025.20475.qmail@sourceware.org> (raw)
In-Reply-To: <bug-14912-7427@http.gcc.gnu.org/bugzilla/>



------- Comment #44 from pluto at agmk dot net  2008-09-25 13:20 -------
i can reproduce this internal error on both 4.3.1 and 4.3-head.
here's a backtrace:

Breakpoint 1, error_recursion (context=0x10aeb40) at
../../gcc-4_3-branch/gcc/diagnostic.c:637
637       if (context->lock < 3)
(gdb) p *context
$1 = {
  printer = 0x112dc10,
  diagnostic_count =     {0,
    0,
    0,
    2,
    0,
    0,
    0,
    0,
    0,
    0},
  issue_warnings_are_errors_message = 1 '\001',
  warning_as_error_requested = 0 '\0',
  classify_diagnostic =     '\0' <repeats 764 times>,
  show_option_requested = 0 '\0',
  abort_on_error = 0 '\0',
  begin_diagnostic = 0x471f0c <cp_diagnostic_starter>,
  end_diagnostic = 0x471f55 <cp_diagnostic_finalizer>,
  internal_error = 0,
  last_function = 0x0,
  last_module = 0,
  lock = 2
}
(gdb) bt
#0  error_recursion (context=0x10aeb40) at
../../gcc-4_3-branch/gcc/diagnostic.c:637
#1  0x00000000005bbf84 in diagnostic_report_diagnostic (context=0x10aeb40,
diagnostic=0x7fff28b41dd0)
    at ../../gcc-4_3-branch/gcc/diagnostic.c:363
#2  0x00000000005bcc7a in internal_error (gmsgid=0xc2a3e7 "in %s, at %s:%d") at
../../gcc-4_3-branch/gcc/diagnostic.c:606
#3  0x00000000005bcdfe in fancy_abort (file=0xbe1418
"../../gcc-4_3-branch/gcc/cp/pt.c", line=15585, function=0xbe60f0
"dependent_type_p")
    at ../../gcc-4_3-branch/gcc/diagnostic.c:660
#4  0x0000000000452025 in dependent_type_p (type=0x7fa41a45acc0) at
../../gcc-4_3-branch/gcc/cp/pt.c:15585
#5  0x0000000000495f83 in cxx_sizeof_or_alignof_type (type=0x7fa41a45acc0,
op=250, complain=1 '\001')
    at ../../gcc-4_3-branch/gcc/cp/typeck.c:1289
#6  0x0000000000447db8 in tsubst_copy_and_build (t=0x7fa41a443b80,
args=0x7fa41a459b40, complain=tf_none, in_decl=0x0, function_p=0 '\0',
    integral_constant_expression_p=1 '\001') at
../../gcc-4_3-branch/gcc/cp/pt.c:10887
#7  0x000000000046d656 in count_non_default_template_args (args=0x7fa41a459b40,
params=0x7fa41a443c00)
    at ../../gcc-4_3-branch/gcc/cp/error.c:172
#8  0x000000000046fd64 in dump_template_parms (info=0x7fa41a45b750, primary=0,
flags=4) at ../../gcc-4_3-branch/gcc/cp/error.c:1343
#9  0x000000000046e387 in dump_aggr_type (t=0x7fa41a45ae40, flags=4) at
../../gcc-4_3-branch/gcc/cp/error.c:548
#10 0x000000000046dba5 in dump_type (t=0x7fa41a45ae40, flags=4) at
../../gcc-4_3-branch/gcc/cp/error.c:342
#11 0x000000000046f80a in dump_function_decl (t=0x7fa41a45c480, flags=4) at
../../gcc-4_3-branch/gcc/cp/error.c:1162
#12 0x000000000046f0e7 in dump_decl (t=0x7fa41a4a0b60, flags=4) at
../../gcc-4_3-branch/gcc/cp/error.c:947
#13 0x000000000047199b in decl_as_string (decl=0x7fa41a4a0b60, flags=4) at
../../gcc-4_3-branch/gcc/cp/error.c:2220
#14 0x00000000004719ca in lang_decl_name (decl=0x7fa41a4a0b60, v=2) at
../../gcc-4_3-branch/gcc/cp/error.c:2230
#15 0x00000000004bfbc9 in cxx_printable_name (decl=0x7fa41a4a0b60, v=2) at
../../gcc-4_3-branch/gcc/cp/tree.c:1207
#16 0x0000000000472143 in cp_print_error_function (context=0x10aeb40,
diagnostic=0x7fff28b42670) at ../../gcc-4_3-branch/gcc/cp/error.c:2471
#17 0x0000000000471f32 in cp_diagnostic_starter (context=0x10aeb40,
diagnostic=0x7fff28b42670) at ../../gcc-4_3-branch/gcc/cp/error.c:2424
#18 0x00000000005bc1b3 in diagnostic_report_diagnostic (context=0x10aeb40,
diagnostic=0x7fff28b42670)
    at ../../gcc-4_3-branch/gcc/diagnostic.c:421
#19 0x00000000005bcc7a in internal_error (gmsgid=0xc2a3e7 "in %s, at %s:%d") at
../../gcc-4_3-branch/gcc/diagnostic.c:606
#20 0x00000000005bcdfe in fancy_abort (file=0xbe1418
"../../gcc-4_3-branch/gcc/cp/pt.c", line=15585, function=0xbe60f0
"dependent_type_p")
    at ../../gcc-4_3-branch/gcc/diagnostic.c:660
#21 0x0000000000452025 in dependent_type_p (type=0x7fa41a45acc0) at
../../gcc-4_3-branch/gcc/cp/pt.c:15585
#22 0x0000000000495f83 in cxx_sizeof_or_alignof_type (type=0x7fa41a45acc0,
op=250, complain=1 '\001')
    at ../../gcc-4_3-branch/gcc/cp/typeck.c:1289
#23 0x0000000000447db8 in tsubst_copy_and_build (t=0x7fa41a443b80,
args=0x7fa41a459b40, complain=tf_none, in_decl=0x0, function_p=0 '\0',
    integral_constant_expression_p=1 '\001') at
../../gcc-4_3-branch/gcc/cp/pt.c:10887
#24 0x000000000046d656 in count_non_default_template_args (args=0x7fa41a459b40,
params=0x7fa41a443c00)
    at ../../gcc-4_3-branch/gcc/cp/error.c:172
#25 0x000000000046fd64 in dump_template_parms (info=0x7fa41a45b750, primary=0,
flags=4) at ../../gcc-4_3-branch/gcc/cp/error.c:1343
#26 0x000000000046e387 in dump_aggr_type (t=0x7fa41a45ae40, flags=4) at
../../gcc-4_3-branch/gcc/cp/error.c:548
#27 0x000000000046dba5 in dump_type (t=0x7fa41a45ae40, flags=4) at
../../gcc-4_3-branch/gcc/cp/error.c:342
#28 0x000000000046f80a in dump_function_decl (t=0x7fa41a45c480, flags=4) at
../../gcc-4_3-branch/gcc/cp/error.c:1162
#29 0x000000000046f0e7 in dump_decl (t=0x7fa41a4a0b60, flags=4) at
../../gcc-4_3-branch/gcc/cp/error.c:947
#30 0x000000000047199b in decl_as_string (decl=0x7fa41a4a0b60, flags=4) at
../../gcc-4_3-branch/gcc/cp/error.c:2220
#31 0x00000000004719ca in lang_decl_name (decl=0x7fa41a4a0b60, v=2) at
../../gcc-4_3-branch/gcc/cp/error.c:2230
#32 0x00000000004bfbc9 in cxx_printable_name (decl=0x7fa41a4a0b60, v=2) at
../../gcc-4_3-branch/gcc/cp/tree.c:1207
#33 0x0000000000472143 in cp_print_error_function (context=0x10aeb40,
diagnostic=0x7fff28b42f10) at ../../gcc-4_3-branch/gcc/cp/error.c:2471
#34 0x0000000000471f32 in cp_diagnostic_starter (context=0x10aeb40,
diagnostic=0x7fff28b42f10) at ../../gcc-4_3-branch/gcc/cp/error.c:2424
#35 0x00000000005bc1b3 in diagnostic_report_diagnostic (context=0x10aeb40,
diagnostic=0x7fff28b42f10)
    at ../../gcc-4_3-branch/gcc/diagnostic.c:421
#36 0x00000000005bcc7a in internal_error (gmsgid=0xc2a3e7 "in %s, at %s:%d") at
../../gcc-4_3-branch/gcc/diagnostic.c:606
#37 0x00000000005bcdfe in fancy_abort (file=0xbe1418
"../../gcc-4_3-branch/gcc/cp/pt.c", line=15585, function=0xbe60f0
"dependent_type_p")
    at ../../gcc-4_3-branch/gcc/diagnostic.c:660
#38 0x0000000000452025 in dependent_type_p (type=0x7fa41a45acc0) at
../../gcc-4_3-branch/gcc/cp/pt.c:15585
#39 0x0000000000495f83 in cxx_sizeof_or_alignof_type (type=0x7fa41a45acc0,
op=250, complain=1 '\001')
    at ../../gcc-4_3-branch/gcc/cp/typeck.c:1289
#40 0x0000000000447db8 in tsubst_copy_and_build (t=0x7fa41a443b80,
args=0x7fa41a459b40, complain=tf_none, in_decl=0x0, function_p=0 '\0',
    integral_constant_expression_p=1 '\001') at
../../gcc-4_3-branch/gcc/cp/pt.c:10887
#41 0x000000000046d656 in count_non_default_template_args (args=0x7fa41a459b40,
params=0x7fa41a443c00)
    at ../../gcc-4_3-branch/gcc/cp/error.c:172
#42 0x000000000046fd64 in dump_template_parms (info=0x7fa41a45b750, primary=0,
flags=4) at ../../gcc-4_3-branch/gcc/cp/error.c:1343
#43 0x000000000046e387 in dump_aggr_type (t=0x7fa41a45ae40, flags=4) at
../../gcc-4_3-branch/gcc/cp/error.c:548
#44 0x000000000046dba5 in dump_type (t=0x7fa41a45ae40, flags=4) at
../../gcc-4_3-branch/gcc/cp/error.c:342
#45 0x000000000046f80a in dump_function_decl (t=0x7fa41a45c480, flags=4) at
../../gcc-4_3-branch/gcc/cp/error.c:1162
#46 0x000000000046f0e7 in dump_decl (t=0x7fa41a4a0b60, flags=4) at
../../gcc-4_3-branch/gcc/cp/error.c:947
#47 0x000000000047199b in decl_as_string (decl=0x7fa41a4a0b60, flags=4) at
../../gcc-4_3-branch/gcc/cp/error.c:2220
#48 0x00000000004719ca in lang_decl_name (decl=0x7fa41a4a0b60, v=2) at
../../gcc-4_3-branch/gcc/cp/error.c:2230
#49 0x00000000004bfbc9 in cxx_printable_name (decl=0x7fa41a4a0b60, v=2) at
../../gcc-4_3-branch/gcc/cp/tree.c:1207
#50 0x0000000000446174 in tsubst_expr (t=0x7fa41a462580, args=0x7fa41a2a68a0,
complain=tf_warning_or_error, in_decl=0x7fa41a45c480,
    integral_constant_expression_p=0 '\0') at
../../gcc-4_3-branch/gcc/cp/pt.c:10291
#51 0x0000000000445dee in tsubst_expr (t=0x7fa41a4151b0, args=0x7fa41a2a68a0,
complain=tf_warning_or_error, in_decl=0x7fa41a45c480,
    integral_constant_expression_p=0 '\0') at
../../gcc-4_3-branch/gcc/cp/pt.c:10217
#52 0x0000000000446613 in tsubst_expr (t=0x7fa41a406b90, args=0x7fa41a2a68a0,
complain=tf_warning_or_error, in_decl=0x7fa41a45c480,
    integral_constant_expression_p=0 '\0') at
../../gcc-4_3-branch/gcc/cp/pt.c:10374
#53 0x0000000000450ffb in instantiate_decl (d=0x7fa41a4a0b60, defer_ok=0,
expl_inst_class_mem_p=0 '\0')
    at ../../gcc-4_3-branch/gcc/cp/pt.c:15040
#54 0x0000000000451264 in instantiate_pending_templates (retries=0) at
../../gcc-4_3-branch/gcc/cp/pt.c:15138
#55 0x000000000046c4e3 in cp_write_global_declarations () at
../../gcc-4_3-branch/gcc/cp/decl2.c:3331
#56 0x000000000077b6ff in compile_file () at
../../gcc-4_3-branch/gcc/toplev.c:1055
#57 0x000000000077d142 in do_compile () at
../../gcc-4_3-branch/gcc/toplev.c:2240
#58 0x000000000077d1a6 in toplev_main (argc=13, argv=0x7fff28b43e78) at
../../gcc-4_3-branch/gcc/toplev.c:2272
#59 0x000000000052ed37 in main (argc=13, argv=0x7fff28b43e78) at
../../gcc-4_3-branch/gcc/main.c:35


-- 


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


  parent reply	other threads:[~2008-09-25 13:21 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-14912-7427@http.gcc.gnu.org/bugzilla/>
2007-10-12 11:05 ` pcarlini at suse dot de
2007-10-15 14:05 ` pluto at agmk dot net
2008-09-19 12:24 ` b0ntrict0r at yandex dot ru
2008-09-22  9:23 ` pluto at agmk dot net
2008-09-22 15:13 ` b0ntrict0r at yandex dot ru
2008-09-22 21:55 ` pluto at agmk dot net
2008-09-23 10:13 ` pluto at agmk dot net
2008-09-23 10:14 ` pluto at agmk dot net
2008-09-23 14:32 ` b0ntrict0r at yandex dot ru
2008-09-25 13:21 ` pluto at agmk dot net [this message]
2009-03-02 21:04 ` pluto at agmk dot net
2009-03-02 21:59 ` hjl dot tools at gmail dot com
2009-03-03 18:55 ` jason at gcc dot gnu dot org
2009-03-23 19:01 ` pluto at agmk dot net
2009-04-05  6:06 ` jason at gcc dot gnu dot org
2009-04-05 19:29 ` jason at gcc dot gnu dot org
2009-04-09 20:30 ` jason at gcc dot gnu dot org
2009-07-26 10:38 ` arekm at pld-linux dot org
2009-07-29 20:36 ` jason at gcc dot gnu dot org
2009-07-29 21:09 ` jason at gcc dot gnu dot org
2004-04-10 19:55 [Bug c++/14912] New: " schnetter at aei dot mpg dot de
2004-04-10 19:55 ` [Bug c++/14912] " pinskia at gcc dot gnu dot org
2004-04-10 20:01 ` schnetter at aei dot mpg dot de
2004-04-10 21:50 ` pinskia at gcc dot gnu dot org
2004-04-10 22:40 ` gdr at integrable-solutions dot net
2005-03-23  2:45 ` giovannibajo at libero dot it
2005-03-23  4:55 ` dave at boost-consulting dot com
2005-03-23 10:51 ` giovannibajo at libero dot it
2005-03-23 11:01 ` giovannibajo at libero dot it
2005-03-23 12:55 ` dave at boost-consulting dot com
2005-03-24  2:15 ` giovannibajo at libero dot it
2005-03-25 22:07 ` gdr at integrable-solutions dot net
2005-03-25 22:09 ` gdr at integrable-solutions dot net
2005-03-25 22:09 ` gdr at integrable-solutions dot net
2005-03-25 22:12 ` gdr at integrable-solutions dot net
2005-03-26  0:31 ` giovannibajo at libero dot it
2005-03-26  0:35 ` giovannibajo at libero dot it
2005-03-26  2:01 ` dave at boost-consulting dot com
2005-03-26  4:04 ` gdr at integrable-solutions dot net
2005-03-26  4:06 ` gdr at integrable-solutions dot net
2005-03-26  4:14 ` gdr at integrable-solutions dot net
2005-03-26 11:59 ` giovannibajo at libero dot it
2005-03-26 12:57 ` dave at boost-consulting dot com
2005-03-26 15:40 ` gdr at integrable-solutions dot net
2005-03-26 15:55 ` gdr at integrable-solutions dot net
2005-03-26 16:14 ` dave at boost-consulting dot com
2005-03-26 19:24 ` giovannibajo at libero dot it
2005-03-26 19:26 ` giovannibajo at libero dot it
2005-03-26 19:52 ` gdr at integrable-solutions dot net
2005-03-26 22:58 ` bangerth at dealii dot org
2005-03-27  0:56 ` giovannibajo at libero dot it
2005-03-27  1:53 ` dave at boost-consulting dot com
2005-03-27  3:16 ` gdr at integrable-solutions dot net

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080925132025.20475.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).