public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/37088]  New: Functions with default parameters not correctly handled inside templates.
@ 2008-08-11 22:40 tmsriram at google dot com
  2008-08-11 22:46 ` [Bug c++/37088] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: tmsriram at google dot com @ 2008-08-11 22:40 UTC (permalink / raw)
  To: gcc-bugs

For this simple program (test.cc):
-------------------------------------------------------------------------
template <typename Pred>
void AssertPred(Pred pred) {
 pred("x", "y");
}

bool pred4(const char *, const char *, const char *x = "", const char *y = "");
bool pred2(const char *, const char *);

void foof() {
  AssertPred(pred2);
  AssertPred(pred4);
}
-----------------------------------------------------------------------------


> $gcc421 -c test.ii (Success with gcc-4.2.1)


> $gcc431  -c test.ii (Failure with gcc-4.3.1)

test.ii: In function 'void AssertPred(Pred) [with Pred = bool (*)(const char*,
const char*, const char*, const char*)]':
test.ii:   instantiated from here
test.ii: error: too few arguments to function


-- 
           Summary: Functions with default parameters not correctly handled
                    inside templates.
           Product: gcc
           Version: 4.3.1
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tmsriram at google dot com
 GCC build triplet: x86_64
  GCC host triplet: x86_64
GCC target triplet: x86_64


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


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

end of thread, other threads:[~2009-02-10 22:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-11 22:40 [Bug c++/37088] New: Functions with default parameters not correctly handled inside templates tmsriram at google dot com
2008-08-11 22:46 ` [Bug c++/37088] " pinskia at gcc dot gnu dot org
2008-08-13 16:22 ` bangerth at dealii dot org
2009-02-10 22:04 ` pinskia 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).