public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/31445]  New: [4.3 regression] type_argument_pack not supported by dump_type
@ 2007-04-02 20:24 reichelt at gcc dot gnu dot org
  2007-04-02 20:25 ` [Bug c++/31445] " reichelt at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-04-02 20:24 UTC (permalink / raw)
  To: gcc-bugs

More fallout from the variadic templates on mainline:

===========================================================
template <typename... T> struct A
{
  void foo(T...);
  A(T... t) { foo(t); }
};

A<int> a(0);
===========================================================

This is only a diagnostic problem in the second to last line:

bug.cc: In constructor 'A<T>::A(T ...)':
bug.cc:4: error: parameter packs not expanded with `...':
bug.cc:4: note:         't'
bug.cc: In constructor 'A<T>::A(T ...) [with T = int]':
bug.cc:7:   instantiated from here
bug.cc:4: error: no matching function for call to
'A<int>::foo(#'type_argument_pack' not supported by dump_type#<type error>)'
bug.cc:3: note: candidates are: void A<T>::foo(T ...) [with T = int]


-- 
           Summary: [4.3 regression] type_argument_pack not supported by
                    dump_type
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: diagnostic, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


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


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

* [Bug c++/31445] [4.3 regression] type_argument_pack not supported by dump_type
  2007-04-02 20:24 [Bug c++/31445] New: [4.3 regression] type_argument_pack not supported by dump_type reichelt at gcc dot gnu dot org
@ 2007-04-02 20:25 ` reichelt at gcc dot gnu dot org
  2007-04-08  0:01 ` bangerth at dealii dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-04-02 20:25 UTC (permalink / raw)
  To: gcc-bugs



-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.3.0


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


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

* [Bug c++/31445] [4.3 regression] type_argument_pack not supported by dump_type
  2007-04-02 20:24 [Bug c++/31445] New: [4.3 regression] type_argument_pack not supported by dump_type reichelt at gcc dot gnu dot org
  2007-04-02 20:25 ` [Bug c++/31445] " reichelt at gcc dot gnu dot org
@ 2007-04-08  0:01 ` bangerth at dealii dot org
  2007-04-25 15:46 ` dgregor at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: bangerth at dealii dot org @ 2007-04-08  0:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from bangerth at dealii dot org  2007-04-08 01:01 -------
I also find this a bit weird:

bug.cc:4: error: parameter packs not expanded with `...':
bug.cc:4: note:         't'

If the error ends with a colon, then the variable name should also be
listed as part of the error message, not as a separate note. Also, the
typical wording would be:

  error: parameter pack 't' not expended with `...'

in keeping with other messages. 


-- 

bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bangerth at dealii dot org


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


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

* [Bug c++/31445] [4.3 regression] type_argument_pack not supported by dump_type
  2007-04-02 20:24 [Bug c++/31445] New: [4.3 regression] type_argument_pack not supported by dump_type reichelt at gcc dot gnu dot org
  2007-04-02 20:25 ` [Bug c++/31445] " reichelt at gcc dot gnu dot org
  2007-04-08  0:01 ` bangerth at dealii dot org
@ 2007-04-25 15:46 ` dgregor at gcc dot gnu dot org
  2007-05-25 13:16 ` dgregor at gcc dot gnu dot org
  2007-05-25 17:53 ` dgregor at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: dgregor at gcc dot gnu dot org @ 2007-04-25 15:46 UTC (permalink / raw)
  To: gcc-bugs



-- 

dgregor at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |dgregor at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2007-04-25 16:46:50
               date|                            |


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


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

* [Bug c++/31445] [4.3 regression] type_argument_pack not supported by dump_type
  2007-04-02 20:24 [Bug c++/31445] New: [4.3 regression] type_argument_pack not supported by dump_type reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2007-04-25 15:46 ` dgregor at gcc dot gnu dot org
@ 2007-05-25 13:16 ` dgregor at gcc dot gnu dot org
  2007-05-25 17:53 ` dgregor at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: dgregor at gcc dot gnu dot org @ 2007-05-25 13:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from dgregor at gcc dot gnu dot org  2007-05-25 14:16 -------
Subject: Bug 31445

Author: dgregor
Date: Fri May 25 13:15:04 2007
New Revision: 125062

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=125062
Log:
2007-05-25  Douglas Gregor <doug.gregor@gmail.com>

        PR c++/31431
        PR c++/31432
        PR c++/31434
        PR c++/31435
        PR c++/31437
        PR c++/31438
        PR c++/31442
        PR c++/31443
        PR c++/31444
        PR c++/31445
        * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
        * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
        * pt.c (check_for_bare_parameter_packs): Return bool indicated
        whether everything was okay. Fix indentation.
        (push_template_decl_real): Check for bare parameter packs in
        function parameters; where errors occur, mark the parameter types
        with ERROR_MARK_NODEs to avert ICEs.
        (coerce_template_parameter_pack): New.
        (coerce_template_parms): Moved parameter pack coercion into
        coerce_template_parameter_pack, and permit it anywhere in the
        template parameter list (not just at the end). Parameter and
        argument indices can vary (somewhat) separately now, so add
        PARM_IDX and ARG_IDX.
        (fn_type_unification): Don't set an argument pack as incomplete if
        no argument pack was deduced.
        (type_unification_real): If a type parameter is a parameter pack
        and has not otherwise been deduced, it will be deduced to an empty
        parameter pack.
        (more_specialized_fn): Use the actual lengths of the argument
        lists when comparing against expansions.
        * semantics.c (finish_member_declaration): If a field's type has
        bare parameter packs, error and set its type to ERROR_MARK_NODE.

2007-05-25  Douglas Gregor <doug.gregor@gmail.com>

        PR c++/31431
        PR c++/31432
        PR c++/31434
        PR c++/31435
        PR c++/31437
        PR c++/31438
        PR c++/31442
        PR c++/31443
        PR c++/31444
        PR c++/31445
        * g++.dg/cpp0x/pr31431.C: New.
        * g++.dg/cpp0x/pr31437.C: New.
        * g++.dg/cpp0x/pr31442.C: New.
        * g++.dg/cpp0x/pr31444.C: New.
        * g++.dg/cpp0x/pr31431-2.C: New.
        * g++.dg/cpp0x/pr31432.C: New.
        * g++.dg/cpp0x/pr31434.C: New.
        * g++.dg/cpp0x/pr31438.C: New.
        * g++.dg/cpp0x/pr31443.C: New.
        * g++.dg/cpp0x/pr31445.C: New.
        * g++.dg/cpp0x/variadic-crash1.C: New.





Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/pr31431-2.C
    trunk/gcc/testsuite/g++.dg/cpp0x/pr31431.C
    trunk/gcc/testsuite/g++.dg/cpp0x/pr31432.C
    trunk/gcc/testsuite/g++.dg/cpp0x/pr31434.C
    trunk/gcc/testsuite/g++.dg/cpp0x/pr31437.C
    trunk/gcc/testsuite/g++.dg/cpp0x/pr31438.C
    trunk/gcc/testsuite/g++.dg/cpp0x/pr31442.C
    trunk/gcc/testsuite/g++.dg/cpp0x/pr31443.C
    trunk/gcc/testsuite/g++.dg/cpp0x/pr31444.C
    trunk/gcc/testsuite/g++.dg/cpp0x/pr31445.C
    trunk/gcc/testsuite/g++.dg/cpp0x/variadic-crash1.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/cp-tree.h
    trunk/gcc/cp/error.c
    trunk/gcc/cp/pt.c
    trunk/gcc/cp/semantics.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/31445] [4.3 regression] type_argument_pack not supported by dump_type
  2007-04-02 20:24 [Bug c++/31445] New: [4.3 regression] type_argument_pack not supported by dump_type reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2007-05-25 13:16 ` dgregor at gcc dot gnu dot org
@ 2007-05-25 17:53 ` dgregor at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: dgregor at gcc dot gnu dot org @ 2007-05-25 17:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from dgregor at gcc dot gnu dot org  2007-05-25 17:53 -------
Fixed on mainline.


-- 

dgregor at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2007-05-25 17:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-02 20:24 [Bug c++/31445] New: [4.3 regression] type_argument_pack not supported by dump_type reichelt at gcc dot gnu dot org
2007-04-02 20:25 ` [Bug c++/31445] " reichelt at gcc dot gnu dot org
2007-04-08  0:01 ` bangerth at dealii dot org
2007-04-25 15:46 ` dgregor at gcc dot gnu dot org
2007-05-25 13:16 ` dgregor at gcc dot gnu dot org
2007-05-25 17:53 ` dgregor 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).