public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/41958]  New: [c++0x] bogus variadic partial ordering code
@ 2009-11-05 21:05 jason at gcc dot gnu dot org
  2009-11-05 22:41 ` [Bug c++/41958] " jason at gcc dot gnu dot org
  0 siblings, 1 reply; 10+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-11-05 21:05 UTC (permalink / raw)
  To: gcc-bugs

more_specialized_fn contains

  /* All things being equal, if the next argument is a pack expansion
     for one function but not for the other, prefer the
     non-variadic function.  */
  if ((better1 > 0) - (better2 > 0) == 0
      && args1 && TREE_VALUE (args1)
      && args2 && TREE_VALUE (args2))
    {
      if (TREE_CODE (TREE_VALUE (args1)) == TYPE_PACK_EXPANSION)
        return TREE_CODE (TREE_VALUE (args2)) == TYPE_PACK_EXPANSION ? 0 : -1;
      else if (TREE_CODE (TREE_VALUE (args2)) == TYPE_PACK_EXPANSION)
        return 1;
    }

which makes us prefer a non-variadic option even when deduction failed in both
directions, which makes variadic-crash1.C pass purely by accident.  This also
makes us prefer an unused default argument to a function parameter pack.


-- 
           Summary: [c++0x] bogus variadic partial ordering code
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jason at gcc dot gnu dot org


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


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

end of thread, other threads:[~2018-11-07  0:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-41958-4@http.gcc.gnu.org/bugzilla/>
2012-07-05 10:10 ` [Bug c++/41958] [c++0x] bogus variadic partial ordering code redi at gcc dot gnu.org
2012-11-18 13:41 ` paolo.carlini at oracle dot com
2012-11-18 22:29 ` zeratul976 at hotmail dot com
2012-11-19  0:21 ` paolo.carlini at oracle dot com
2012-11-19  1:57 ` jason at gcc dot gnu.org
2012-11-19  2:12 ` paolo.carlini at oracle dot com
2012-11-19  3:50 ` zeratul976 at hotmail dot com
2012-11-19 13:42 ` jason at gcc dot gnu.org
2018-11-07  0:51 ` frankhb1989 at gmail dot com
2009-11-05 21:05 [Bug c++/41958] New: " jason at gcc dot gnu dot org
2009-11-05 22:41 ` [Bug c++/41958] " 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).